/* The apps directory as a gallery: objects in a walkable collection, each with
   the same museum label (docs/features/site-scroll/stories/01-apps-index.md).
   Tokens from css/site.css only. The scroll engine (css/scrollcraft.css) is
   vendored unchanged and imported into the scrollcraft layer that site.css
   declares first, so brand components always win. No shadows except the
   floating shelf map, no gradients, no tilted frames. */
@import url("/css/scrollcraft.css") layer(scrollcraft);
:root{
  --sc-canvas:var(--color-surface);--sc-surface:var(--color-surface-sunken);
  --sc-ink:var(--color-ink);--sc-ink-soft:var(--color-ink-muted);
  --sc-accent:var(--color-focus);--sc-accent-ink:var(--color-white);
  --sc-font-display:var(--font-sans);--sc-font-text:var(--font-sans);--sc-font-mono:var(--font-mono);
  --hdr:65px;--map:56px;
}
.gallery-main{background:var(--color-surface);color:var(--color-ink);padding-bottom:var(--map)}
.gallery-main p{margin:0}
.gallery-main h1,.gallery-main h2,.gallery-main h3{margin:0;color:var(--color-ink);text-wrap:balance}
.gallery-main :focus-visible{outline:2px solid var(--color-focus);outline-offset:2px;border-radius:var(--radius-sm)}

/* The shelf map: a floor plan of the collection pinned to the bottom edge.
   One cell per object, grouped by room; passed objects keep a tick. */
.shelf-map{position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--color-surface);border-top:1px solid var(--color-line);box-shadow:var(--shadow-float);padding-bottom:env(safe-area-inset-bottom,0px);transition:opacity .25s ease,transform .25s ease}
.shelf-map.is-docked{opacity:0;transform:translateY(100%);pointer-events:none}
.shelf-map-inner{max-width:var(--container-site);margin:0 auto;height:var(--map);padding:0 16px;display:flex;align-items:center;gap:20px}
.shelf-room ol{list-style:none;margin:0;padding:0;display:flex;gap:6px;align-items:center}
.shelf-room+.shelf-room{padding-left:20px;border-left:1px solid var(--color-line-subtle)}
.shelf-room a{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 4px;color:var(--color-ink-muted);text-decoration:none;font-size:13px;font-weight:600;border-radius:var(--radius-sm)}
.shelf-room a:hover{color:var(--color-ink)}
.cell{position:relative;display:block;width:28px;height:18px;border-radius:3px;border:1px solid var(--color-line);background:var(--color-surface);transition:background-color .2s ease,border-color .2s ease}
.shelf-room-soon .cell{border-style:dashed}
.cell svg{display:none;position:absolute;inset:3px 6px;width:auto;height:auto;stroke:var(--color-navy)}
a.is-seen .cell svg{display:block}
a.is-here .cell svg{stroke:var(--color-white)}
a.is-seen .cell{background:var(--color-navy-soft);border-color:var(--color-navy)}
a.is-here .cell{background:var(--color-navy);border-color:var(--color-navy)}
.map-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shelf-count{margin-left:auto!important;display:flex;gap:16px;align-items:baseline;font-size:13px;color:var(--color-ink-muted);white-space:nowrap;font-variant-numeric:tabular-nums}
/* a fixed slot, right-aligned against the count: the readout never changes size
   as the name changes (NF2), the longest name ("Assisty Inventory Management") fits */
.shelf-here{font-weight:600;color:var(--color-ink);display:inline-block;width:15.5em;text-align:right;overflow:hidden;text-overflow:ellipsis}

/* Rooms: a pinned stage whose rail travels sideways under vertical scroll. */
.room-stage{background:var(--color-surface);display:flex;align-items:center;box-sizing:border-box;padding:var(--hdr) 0 var(--map)}
.room-assisty .room-stage{background:var(--color-surface-sunken)}
/* the first room starts under the sticky header, so the opening frame is the pinned frame;
   with or without the engine (the stage pads by the header), or the deferred engine's
   sc-ready moved the room 65 px up after the first paint: a layout shift on every visit */
.room-datima{margin-top:calc(-1 * var(--hdr))}
.rail{gap:40px;align-items:flex-start;padding:24px 16px 24px max(16px,calc((100vw - var(--container-site))/2 + 16px))}
.rail-plate,.rail-note{align-self:center}
.rail>*{flex:0 0 auto}
.rail-plate{width:min(460px,84vw)}
.rail-plate h1{font-size:44px;line-height:1.08;font-weight:700;letter-spacing:-.02em}
.rail-plate p{margin-top:16px!important;font-size:18px;line-height:1.55;max-width:40ch}
.room-label{margin-top:32px!important;padding-top:16px;border-top:1px solid var(--color-line-subtle);font-size:15px;font-weight:400;color:var(--color-ink-muted)}
.room-label strong{color:var(--color-ink);font-weight:700}

/* An object: a plinth (a real capture, cropped above its caption bar, or the
   app icon) and the label. Every object uses the same label schema. */
.obj{width:min(440px,84vw);display:flex;flex-direction:column;gap:20px}
.plinth{margin:0;aspect-ratio:16/7;max-width:100%;border:1px solid var(--color-line-subtle);border-radius:var(--radius-lg);background:var(--color-surface-sunken);overflow:hidden;display:flex;align-items:center;justify-content:center}
.plinth img{width:100%;height:100%;object-fit:cover;object-position:top center}
.plinth-icon img{width:96px;height:96px;object-fit:contain;border-radius:var(--radius-xl)}
.room-assisty .plinth{background:var(--color-surface)}
.plinth-empty{border-style:dashed}
.plinth-empty img{opacity:.35}
.label{border-top:2px solid var(--color-navy);padding-top:14px}
.label h3,.plate-title{font-size:22px;line-height:1.25;font-weight:700;letter-spacing:-.01em}
.label-brand{margin-top:2px!important;font-size:13px;font-weight:600;color:var(--color-ink-muted)}
.label-does{margin-top:10px!important;font-size:16px;line-height:1.5;max-width:44ch}
.label dl{margin:14px 0 0;display:grid;gap:0}
.label dl div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;padding:7px 0;border-top:1px solid var(--color-line-subtle);font-size:14px}
.label dt{color:var(--color-ink-muted)}
.label dd{margin:0;font-weight:600}
.label-link{display:inline-block;margin-top:14px;color:var(--color-link);font-size:15px;font-weight:600;text-decoration:none}
.label-link:hover{color:var(--color-link-hover);text-decoration:underline;text-underline-offset:3px}
.obj-soon .label{border-top-color:var(--color-line)}
.rail-note{width:min(340px,80vw);font-size:16px;line-height:1.55;color:var(--color-ink)}

/* The wall between rooms: the one hard change of ground on the page. */
.room-wall{background:var(--color-surface-sunken);border-top:1px solid var(--color-line-subtle);padding:120px 0 56px}
.wall-inner{max-width:var(--container-site);margin:0 auto;padding:0 16px}
.room-wall h2{font-size:56px;line-height:1.05;font-weight:400;letter-spacing:-.025em;color:var(--color-ink-muted)}
.room-wall h2 strong{display:block;color:var(--color-ink);font-weight:700}
.room-wall p{margin-top:20px!important;font-size:19px;line-height:1.55;max-width:46ch}

/* Coming next: a vitrine in ordinary flow. */
.vitrine{padding:96px 0;border-top:1px solid var(--color-line-subtle)}
.vitrine-inner{max-width:var(--container-site);margin:0 auto;padding:0 16px}
.vitrine .room-label{margin-top:0!important;border-top:0;padding-top:0;font-size:22px}
.vitrine-row{margin-top:32px;display:grid;grid-template-columns:repeat(2,minmax(0,440px));gap:40px}
.vitrine-row .obj{width:auto}

/* The close: an inquiry plate typeset exactly like a label. */
.inquiry{border-top:1px solid var(--color-line-subtle)}
.inquiry-stage{background:var(--color-surface);display:flex;justify-content:center;padding:120px 16px 120px}
.inquiry-plate{width:min(560px,100%)}
.label-plate{border-top-width:3px}
.plate-title{font-size:30px}
.plate-mail{user-select:all}
.label-plate dl div{grid-template-columns:136px minmax(0,1fr)}
.plate-seen dd{font-variant-numeric:tabular-nums}
.plate-links{display:flex;flex-wrap:wrap;gap:4px 24px}

/* Without the engine (no JavaScript), a rail is an ordinary wrapping row. */
html:not(.sc-ready) .rail{flex-wrap:wrap;padding-top:48px;padding-bottom:48px}
html:not(.sc-ready) .room-datima .rail-plate{position:static;width:min(460px,84vw)}
html:not(.sc-ready) .rail-plate p{display:block}
html:not(.sc-ready) .shelf-count{display:none}

@media(min-width:768px){.shelf-map-inner,.wall-inner,.vitrine-inner{padding:0 24px}}
@media(max-width:900px){
  .shelf-map-inner{gap:10px}
  .shelf-room ol{gap:2px}
  .shelf-room+.shelf-room{padding-left:10px}
  .shelf-room a{padding:0 2px}
  .cell{width:20px;height:16px}
}
@media(max-width:760px){
  .room-stage{align-items:flex-start}
  .rail{gap:20px;padding-top:16px}
  .room-datima .rail{padding-top:150px;position:relative}
  .room-datima .rail-plate{position:absolute;top:12px;left:16px;width:calc(100vw - 32px)}
  .rail-plate h1{font-size:26px}
  .rail-plate p{display:none}
  .room-label{margin-top:12px!important;padding-top:10px;font-size:14px}
  .label-plate dl div{grid-template-columns:110px minmax(0,1fr)}
  .obj{width:82vw;gap:14px}
  .label-does{font-size:15px}
  .room-wall{padding:72px 0 40px}
  .room-wall h2{font-size:36px}
  .room-wall p{font-size:17px}
  .vitrine{padding:64px 0}
  .vitrine-row{grid-template-columns:1fr;gap:40px}
  .plate-title{font-size:26px}
  .inquiry-stage{padding:72px 16px 88px}
}
@media(max-width:600px){.shelf-here{display:none}}
@media(max-width:380px){.shelf-count{font-size:12px}.cell{width:17px}.cell svg{inset:3px 3px}}
@media(prefers-reduced-motion:reduce){.gallery-main *,.shelf-map{transition:none!important}}
