/* Explore, redesigned (DESIGN-SYSTEM.md §12): the top-level pager of four full-bleed covers (For you, Art,
   Ideas, World), and the Art feed (the old Paintings + Poems lenses merged). New file, so app.css stays
   untouched (js/explore.js, js/gallery.js, js/poems.js). Same "museum editorial" tokens as app.css:
   var(--serif)/var(--mono), the warm-black ground, hairline rules instead of boxes. */

/* ---------- the pager: a vertical scroll-snap of full-screen covers, one great image each ----------
   Redesigned 2026-10-08 (David: "this menu is ugly and odd" on a 16 Pro Max). Each cover is the whole screen,
   edge to edge: the image runs under the status bar and takes whatever the text doesn't (about 60% on a 16 Pro
   Max, 55% on a 375 x 812); then the palette band (its real colors, each a button to its color page), the name,
   one line, today's note, and the paper primary, which sits just above the Rooms corner. No next-cover peek:
   the page dots on the right say there's more. Search is the one solid button top-right, inside the safe area. */
.room-sheet>.screen.explore.xp-home,.screen.explore.xp-home{padding:0;width:100%;max-width:none;overflow:hidden}
.xp-wrap{position:relative;height:100%;min-height:0;flex:1}
.xp-pager{position:absolute;inset:0;overflow-y:auto;overflow-x:hidden;scroll-snap-type:y mandatory;overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;touch-action:pan-y}
.xp-pager::-webkit-scrollbar{display:none}
.xp-cover{position:relative;height:100%;scroll-snap-align:start;scroll-snap-stop:always;display:flex;flex-direction:column;overflow:hidden;
  background:var(--tint,var(--surface-1));text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
/* the image: the rest of the screen, never under 44% of it; its own dominant color while it loads */
.xp-img{position:relative;flex:1 1 auto;min-height:44%;background:var(--wash,var(--surface-2));overflow:hidden}
.xp-img::after{content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--top) + 64px);pointer-events:none;
  background:linear-gradient(rgba(10,9,8,.42),rgba(10,9,8,0))}
.xp-img img,.xp-flat,.xp-stripes{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%;display:block}
.xp-photo{opacity:0;transition:opacity 480ms ease-out}
.xp-photo.in{opacity:1}
.xp-stripes{display:flex}
.xp-stripes i{display:block;min-width:2px}
.xp-stripes::after{content:"";position:absolute;left:0;right:0;bottom:0;height:150px;background:linear-gradient(rgba(10,9,8,0),rgba(10,9,8,.72))}
.xp-wait{position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(236,232,223,.06) 50%,transparent 70%) 0 0/250% 100%;
  animation:xpShimmer 1.6s linear infinite}
@keyframes xpShimmer{from{background-position:100% 0}to{background-position:-150% 0}}
.xp-flat-label{position:absolute;left:var(--g);right:calc(var(--g) + 20px);bottom:18px;font:400 40px/1 var(--serif);letter-spacing:-.02em;text-wrap:balance}
.xp-flat-label[data-ink="dark"]{color:#141311}
.xp-flat-label[data-ink="light"]{color:#fff}
.xp-broken{font-size:30px;text-shadow:0 1px 12px rgba(0,0,0,.35)}
.xp-broken small{display:block;margin-top:8px;font:italic 400 17px/1.3 var(--serif);letter-spacing:0;color:rgba(255,255,255,.82)}
/* Saved: a mosaic of what you've kept, or a quiet heart when there's nothing yet */
.xp-mosaic{position:absolute;inset:0;display:grid;grid-template-columns:repeat(var(--cols,3),1fr);grid-auto-rows:1fr;gap:2px;background:var(--tint,var(--ground))}
.xp-mosaic i{display:block}
.xp-mosaic-empty{background:var(--ground)}
.xp-mosaic-empty i{background:var(--surface-1);box-shadow:inset 0 0 0 1px rgba(236,232,223,.05)}
.xp-empty{position:absolute;left:50%;top:50%;width:96px;height:96px;margin:-48px 0 0 -48px;border-radius:50%;display:grid;place-items:center;
  background:var(--surface-2);border:1px solid rgba(236,232,223,.1);color:var(--soft)}
.xp-empty svg{width:40px;height:40px}

/* the palette band: six real colors, sized by share, hairline gaps of the cover's own tint; each opens its page */
.xp-seam{display:flex;gap:2px;height:clamp(30px,4.4vh,44px);flex:none;padding-top:2px}
.xp-chip{display:block;min-width:14px;height:100%;padding:0;border:0;border-radius:0;box-shadow:inset 0 0 0 1px rgba(236,232,223,.08);transition:transform var(--dur-0) ease-out,filter var(--dur-0)}
.xp-chip:active{transform:scaleY(1.18);filter:brightness(1.12)}

.xp-body{flex:none;padding:clamp(16px,2.4vh,24px) calc(var(--g) + 28px) 0 var(--g);display:flex;flex-direction:column}
.xp-name{font:400 clamp(56px,16vw,76px)/.88 var(--serif);letter-spacing:-.03em;color:#fff;margin:0}
.xp-lead{font:400 clamp(18px,4.6vw,20px)/1.28 var(--serif);color:rgba(255,255,255,.9);margin:10px 0 0;text-wrap:balance}
.xp-note{font:400 italic 16px/1.3 var(--serif);color:rgba(255,255,255,.66);margin:7px 0 0;
  overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.xp-note i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;vertical-align:1px;box-shadow:0 0 0 1px rgba(236,232,223,.22)}
/* the primary, in thumb reach just above the Rooms corner (the corner, its gap and a 14 px breath) */
.xp-act{flex:none;padding:clamp(14px,2.2vh,22px) var(--g) calc(var(--bottom) + var(--corner-gap,8px) + var(--corner,48px) + 14px)}
.xp-go{min-height:54px;font-size:24px}

/* page dots: right edge, level with the part's name (placed by explorePager); the current one a short bar */
.xp-dots{position:absolute;right:calc(var(--g) - 6px);top:60%;display:flex;flex-direction:column;align-items:center;gap:7px;z-index:7;pointer-events:none;opacity:0;transition:opacity var(--dur-2)}
.xp-dots.in{opacity:1}
.xp-dots i{width:5px;height:5px;border-radius:3px;background:rgba(236,232,223,.34);transition:height var(--dur-2) var(--ease-grow),background var(--dur-2)}
.xp-dots i.on{height:18px;background:#fff}
/* search: one solid button top-right, inside the safe area, over the status-bar shade (never mid-image) */
.xp-search{position:absolute;right:var(--g);top:calc(var(--top) + 4px);z-index:8;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:#fff}
.xp-search svg{width:20px;height:20px}
.xp-search:active{transform:scale(.94)}
@media (prefers-reduced-motion:reduce){.xp-photo,.xp-dots i{transition:none}.xp-wait{animation:none}}
@media (max-height:700px){.xp-name{font-size:52px}.xp-lead{font-size:17px}.xp-go{min-height:50px;font-size:22px}}

/* ---------- Art: the merged Paintings + Poems feed ---------- */
.art-band{margin:0 calc(-1 * var(--g));padding:0 var(--g) 20px;background:linear-gradient(180deg,var(--tint,var(--ground)) 0%,var(--ground) 280px)}
.art-band .art-top{background:none;position:static;padding-top:calc(var(--top) + 10px)}
.art-band .p-title{margin-top:2px}
.art-bubbles{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;margin:18px calc(-1 * var(--g)) 0;padding:2px var(--g) 6px;scrollbar-width:none}
.art-bubbles::-webkit-scrollbar{display:none}
.art-bubble{flex:none;width:46px;height:46px;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 1px rgba(236,232,223,.14);transition:transform .2s var(--spring)}
.art-bubble:active{transform:scale(.92)}
.art-bubble.on{box-shadow:0 0 0 2px var(--ground),0 0 0 4px var(--ink)}
/* a text filter chip reusing the bubble row's scroller (js/pulp.js, js/photography.js): a pill, not a 46px
   circle, so a label like "Amazing Stories" or "Prokudin-Gorsky" never overlaps its neighbor */
.art-bubble.pulp-chip{width:auto;height:36px;padding:0 14px;border-radius:var(--r-pill);background:none;border:1px solid var(--rule);font:500 13px/34px var(--sans);color:var(--soft);white-space:nowrap;box-shadow:none}
.art-bubble.pulp-chip.on{background:var(--paper);border-color:var(--paper);color:var(--paper-ink);box-shadow:none}
.art-feed{margin-top:28px}
.art-feed .masonry{margin-top:0}
.art-feed .pm-q{padding-top:0}
/* the Art cover's second way in: the painting map (js/paintmap.js), a quiet line under the primary */
.xp-act .xp-alt{display:block;width:100%;min-height:44px;margin-top:6px;border:0;background:none;font:italic 400 18px/44px var(--serif);color:var(--soft);text-decoration:underline;text-underline-offset:4px;text-decoration-color:rgba(236,232,223,.3)}

/* ---------- Museum home: one screen of collections (design/SIMPLIFY/PLAN.md §4 #1) ---------- */
.mu-home{padding-top:calc(var(--top) + 10px)}
.mu-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mu-head .title-1{margin:0}
.mu-head-acts{display:flex;gap:6px;flex:none}
.mu-sub{margin:6px 0 16px;color:var(--soft)}
.mu-today{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface-2);border-radius:var(--r-card,18px);padding:10px;margin:0 0 20px;border:0}
.mu-today:active{transform:scale(.99)}
.mu-today-im{width:60px;height:60px;border-radius:12px;overflow:hidden;flex:none;background:var(--surface-3,#2a2a2a)}
.mu-today-im img{width:100%;height:100%;object-fit:cover;display:block}
.mu-today-wait .mu-today-im{background:linear-gradient(135deg,#2C4F6F,#8E9C8A 60%,#F0DFBC)}
.mu-today-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.mu-today-t b{font:600 16px/1.25 var(--serif);color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mu-today-t small{font:400 13px/1.3 var(--sans);color:var(--soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mu-colls{margin-bottom:22px}
.mu-colls.pl-colls{grid-template-columns:repeat(3,1fr)}
@media (max-width:360px){.mu-colls.pl-colls{grid-template-columns:repeat(2,1fr)}}

/* ---------- Collection tile covers (design/SIMPLIFY/PLAN.md §3.1/§3.4; David, 2026-10-09: "Add a picture
   to each one of these squares.") The .pl-ctile component is places.js's own (css/places.css); these rules
   only add the cover layer and raise the label above it, using the extra .has-cover class for specificity
   so they win regardless of stylesheet load order, without editing places.css. ---------- */
.pl-ctile.has-cover{overflow:hidden}
.pl-ctile-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.pl-ctile-mosaic{position:absolute;inset:0;z-index:0;display:flex}
.pl-ctile-mosaic i{flex:1 1 0}
/* drawn covers (David, 2026-10-10, on the bottom 6: "come up with clever ones... type as image"): inline SVG,
   crisp at any pixel density, no network round trip. The SVG already draws its own background (a tile never
   needs --c behind it), and its own small caption/attribution line sits above the scrim with everything else. */
.pl-ctile-svg{position:absolute;inset:0;z-index:0;line-height:0}
.pl-ctile-svg svg{width:100%;height:100%;display:block}
/* A photo or mosaic sits under the scrim at every lightness, so the fixed .55-opacity scrim (places.css) isn't
   always enough -- tools/check_legibility.js caught "Design objects"/"Aesthetics" at 4.2:1/2.3:1 and every
   count at 12px (under the 13px floor). Darken further and lift the text, scoped to .has-cover so a plain
   flat-pic tile (none exist today, but the fallback path) is untouched. */
.pl-ctile.has-cover::before{z-index:1;background:linear-gradient(rgba(0,0,0,.08) 0%,rgba(0,0,0,.6) 48%,rgba(0,0,0,.94) 78%,rgba(0,0,0,.96) 100%)}
.pl-ctile.has-cover b,.pl-ctile.has-cover small{z-index:2;text-shadow:0 1px 4px rgba(0,0,0,.7)}
.pl-ctile.has-cover b{color:#fff}
.pl-ctile.has-cover small{font-size:13px;color:rgba(255,255,255,.92)}
