/* 24-menu-filter-strip.css

   Filter bar + thumbnail strip styles for the studio menu home page.
   Extracted 2026-04-28 from inline <style> in menu.html (was lines
   1762-2731). Pure CSS, zero Jinja. Tier 3 cleanup audit. */

/* ── Filter + search bar (sits above the thumbnail strip) ────────────── */
.shell-carousel-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 0 2px;
    flex-wrap: wrap;
    min-height: 36px;
    flex-shrink: 0;
}
.shell-carousel-filter {
    display: flex;
    gap: 3px;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    padding: 3px 5px;
    flex-wrap: wrap;
    max-width: 100%;
}
.carousel-filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 140ms, color 140ms;
    line-height: 1;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.carousel-filter-icon {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    display: block;
    opacity: 0.72;
    transition: opacity 140ms;
}
.carousel-filter-btn:hover .carousel-filter-icon,
.carousel-filter-btn.is-active .carousel-filter-icon { opacity: 1; }
.carousel-filter-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}
.carousel-filter-btn.is-active {
    background: rgba(242,139,60,0.22);
    color: #f28b3c;
}
/* ── Kids filter button — sunny accent ───────────────────────── */
.carousel-filter-btn--kids {
    color: #87CEEB;
}
.carousel-filter-btn--kids:hover {
    background: rgba(135,206,235,0.12);
    color: #87CEEB;
}
.carousel-filter-btn--kids.is-active {
    background: rgba(135,206,235,0.18);
    color: #FFD700;
}
/* ── Discipline rail dividers + intent toggles (Stage B, 2026-04-26) ───
   Visual zones in the filter rail:
     [navigation pills] | [cross-cuts: Free / Mine / Testing] | [intent toggles]
   The divider is a thin vertical line; the intent toggles are visually
   distinct from regular pills (dashed border when off, solid accent when on)
   so they read as "settings" rather than "another filter". */
.filter-rail-divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    margin: 0 6px;
    background: rgba(255,255,255,0.16);
    flex-shrink: 0;
}
.filter-intent-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 11px;
    border-radius: 20px;
    border: 1px dashed rgba(255,255,255,0.28);
    background: transparent;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: background 140ms, color 140ms, border-color 140ms;
    line-height: 1;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-intent-toggle .intent-icon {
    font-size: 13px;
    font-weight: 800;
    width: 12px;
    text-align: center;
    line-height: 1;
}
.filter-intent-toggle:hover {
    border-color: rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
}
.filter-intent-toggle.is-on {
    border: 1px solid rgba(242,139,60,0.55);
    color: #f28b3c;
    background: rgba(242,139,60,0.12);
}
.filter-intent-toggle.is-on:hover {
    background: rgba(242,139,60,0.18);
    border-color: rgba(242,139,60,0.75);
}
/* Same toggle styling inside the launcher filter rail */
.launcher-filters .filter-intent-toggle {
    padding: 5px 13px;
    font-size: 12px;
}
.launcher-filters .filter-rail-divider {
    height: 18px;
}
/* ── Filter tab count badges ──────────────────────────────────── */
.filter-count {
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.48;
    margin-left: 4px;
}
.carousel-filter-btn.is-active .filter-count,
.launcher-filter-btn.is-active .filter-count {
    opacity: 0.78;
}
/* ── Kids filter — launcher variant ──────────────────────────── */
.launcher-filter-btn--kids {
    color: #87CEEB;
}
.launcher-filter-btn--kids:hover {
    color: #4FC3F7;
}
.launcher-filter-btn--kids.is-active {
    background: rgba(135,206,235,0.15);
    color: #FFD700;
}
/* ── Filter button photo icons ────────────────────────────────── */
.launcher-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.launcher-filter-icon {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    display: block;
    opacity: 0.72;
    transition: opacity 140ms;
}
.launcher-filter-btn:hover .launcher-filter-icon,
.launcher-filter-btn.is-active .launcher-filter-icon { opacity: 1; }
/* ── Card category corner badge — only shown in All filter view ─ */
.card-cat-badge {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.card-cat-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
[data-demo-carousel][data-active-filter="all"] .card-cat-badge { display: block; }

/* ── Tool test status badge — admin-only, top-LEFT corner ──────────
   Tells the admin "have I tested this? is it broken? is a fix queued?"
   without leaving the menu. Color and emoji come from
   bug_reports.tool_test_status_map() (priority-collapsed across all
   reports for that slug). The badge is a real link to the filtered
   bug-reports page so a click jumps straight to the relevant queue. */
.card-test-badge {
    position: absolute;
    /* .demo-card-outer has 10px padding-top reserved for the crown spike;
       offset the badge into the actual card body so it sits on the
       thumbnail, not floating above the card. */
    top: 14px;
    left: 4px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px 2px 4px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--badge-color, #6b7280);
    box-shadow: 0 1px 4px rgba(0,0,0,0.45);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.25);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card-test-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.card-test-emoji { font-size: 11px; line-height: 1; }
.card-test-count { font-variant-numeric: tabular-nums; }
/* Pulse the high-attention states so they catch the eye while scanning. */
.card-test-badge--needs_human,
.card-test-badge--queued_for_fix {
    animation: card-test-pulse 2.4s ease-in-out infinite;
}
@keyframes card-test-pulse {
    0%, 100% { box-shadow: 0 1px 4px rgba(0,0,0,0.45); }
    50%      { box-shadow: 0 1px 4px rgba(0,0,0,0.45), 0 0 0 4px var(--badge-color); }
}
.carousel-search-input {
    font-size: 12px;
    font-family: inherit;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    color: rgba(255,255,255,0.85);
    padding: 5px 14px;
    outline: none;
    width: 150px;
    transition: border-color 180ms, background 180ms, width 200ms;
}
.carousel-search-input::placeholder { color: rgba(255,255,255,0.32); }
.carousel-search-input:focus {
    border-color: rgba(242,139,60,0.55);
    background: rgba(255,255,255,0.1);
    width: 200px;
}
/* ── Admin thumbnail replace button ────────────────────────────────── */
.thumb-replace-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 4px 5px;
    line-height: 0;
    opacity: 0;
    transition: opacity 150ms, background 150ms, color 150ms;
}
.launcher-card:hover .thumb-replace-btn,
.demo-card:hover .thumb-replace-btn,
.thumb-replace-btn:focus { opacity: 1; }
.thumb-replace-btn:hover {
    background: rgba(242,139,60,0.85);
    color: #fff;
    border-color: rgba(242,139,60,0.9);
}
.thumb-replace-btn.is-uploading {
    pointer-events: none;
    opacity: 1;
    animation: thumb-pulse 800ms ease-in-out infinite alternate;
}
@keyframes thumb-pulse {
    from { background: rgba(242,139,60,0.5); }
    to   { background: rgba(242,139,60,0.85); }
}
/* ── Mine: heart favorite button on every card ──────────────────── */
.card-fav-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 10;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 5px;
    line-height: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 150ms, background 150ms, color 150ms, border-color 150ms;
}
.demo-card:hover .card-fav-btn,
.launcher-card:hover .card-fav-btn,
.card-fav-btn:focus,
.card-fav-btn.is-faved { opacity: 1; }
.card-fav-btn.is-faved {
    background: rgba(242,139,60,0.22);
    border-color: rgba(242,139,60,0.6);
    color: #f28b3c;
}
.card-fav-btn.is-faved svg { fill: #f28b3c; stroke: #f28b3c; }
.card-fav-btn:hover {
    background: rgba(242,139,60,0.35);
    border-color: rgba(242,139,60,0.8);
    color: #fff;
}
.carousel-expand-btn {
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 5px 7px;
    line-height: 0;
    transition: background 150ms, color 150ms;
}
.carousel-expand-btn:hover {
    background: rgba(242,139,60,0.18);
    color: #f28b3c;
}

/* ── Single rail width source of truth: --studio-rail-w ──────────────────
   Button + resize handle both read this var. JS updates on drag/expand.

   Grid layout (open rail):  rail | close-strip(22px) | workspace-shell
   Grid layout (collapsed):  reopen-strip(22px) | workspace-shell           */
.workspace-grid {
    position: relative;
    /* --studio-rail-w is NOT declared here so the cascade is clean:
       • head early-script wins if user has a saved width (no !important needed)
       • inline style.setProperty() wins during drag-resize (no conflict)
       • var() fallback of 260px applies when neither source sets the var */
    grid-template-columns: var(--studio-rail-w, 260px) 22px minmax(0, 1fr);
}
/* JSON blob must not occupy a grid track — otherwise columns shift and the panel strip blows up */
.workspace-grid > script#studio-tools-demos {
    display: none !important;
}
.workspace-grid.rail-collapsed {
    grid-template-columns: 22px minmax(0, 1fr);
}
/* Preserve home/launcher full-width layout: hide rail + strips entirely */
.workspace-grid.is-home {
    grid-template-columns: 1fr;
}
.workspace-grid.is-home .workspace-rail,
.workspace-grid.is-home .rail-collapse-strip,
.workspace-grid.is-home .rail-reopen-strip,
.workspace-grid.is-home .studio-rail-resize-handle { display: none !important; }

/* ── Reopen / Close strips — shared visual language (real grid items) ─────
   Width must match the middle column in .workspace-grid grid-template-columns. */
.rail-reopen-strip,
.rail-collapse-strip {
    display: none; /* toggled by .rail-collapsed state below */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    box-sizing: border-box;
    padding: 0;
    border: none;
    border-radius: 0;
    background: rgba(35, 38, 48, 0.92);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: background .15s, color .15s;
    align-self: stretch; /* stretch full grid row height */
    z-index: 5;
}
.rail-reopen-strip:hover,
.rail-collapse-strip:hover {
    background: rgba(242,139,60,0.18);
    color: #f28b3c;
}
.rail-reopen-label,
.rail-collapse-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}
.rail-reopen-strip { border-right: 1px solid rgba(255,255,255,0.07); }
.rail-collapse-strip { border-left: 1px solid rgba(255,255,255,0.07); }

/* Pin grid columns so strip + shell never shift if extra children exist */
.workspace-grid:not(.is-home):not(.rail-collapsed) > .workspace-rail { grid-column: 1; }
.workspace-grid:not(.is-home):not(.rail-collapsed) > .rail-collapse-strip { grid-column: 2; }
.workspace-grid:not(.is-home):not(.rail-collapsed) > .workspace-shell { grid-column: 3; }
.workspace-grid:not(.is-home).rail-collapsed > .rail-reopen-strip { grid-column: 1; }
.workspace-grid:not(.is-home).rail-collapsed > .workspace-shell { grid-column: 2; }

/* Visibility: open rail shows close-strip, collapsed rail shows reopen-strip */
.workspace-grid:not(.rail-collapsed) .rail-collapse-strip { display: flex; }
.workspace-grid.rail-collapsed .workspace-rail { display: none !important; }
.workspace-grid.rail-collapsed .rail-reopen-strip { display: flex; }
.workspace-grid.rail-collapsed .rail-collapse-strip { display: none; }

/* Reset old padding-right hack — the strip is now its own grid column,
   not overlaid on the rail, so the rail no longer needs reserved space. */
.workspace-rail,
.page-shell.shell-mode .workspace-rail { padding-right: 0; }

/* ── Rail resize handle — sits in the gap column, right of the scrollbar ── */
.studio-rail-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    /* Start 2px past the rail's right edge so the 4px scrollbar is never covered.
       The handle lands in the 22px collapse-strip column where nothing else competes. */
    left: calc(var(--studio-rail-w) + 2px);
    width: 10px;
    cursor: col-resize;
    z-index: 20;
    background: transparent;
    transition: background .15s;
}
.studio-rail-resize-handle:hover,
.workspace-grid.is-rail-resizing .studio-rail-resize-handle {
    background: rgba(242, 139, 60, 0.4);
}
.workspace-grid.rail-collapsed .studio-rail-resize-handle { display: none; }

/* ── Shared rail controls ────────────────────────────────────────────────── */
.workspace-rail {
    --rail-scale: 80px;  /* default card size — overridden by scale slider */
}
.rail-shared-controls {
    padding: 4px 4px 2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 2px;
}
.rail-ctrl-row {
    display: flex;
    gap: 3px;
    align-items: center;
}
.rail-ctrl-search {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    padding: 5px 8px;
    outline: none;
}
.rail-ctrl-search:focus { border-color: rgba(242,139,60,0.5); }
.rail-ctrl-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    padding: 4px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s;
}
.rail-ctrl-btn:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.06); }
.rail-ctrl-btn.is-active { color: #f28b3c; border-color: rgba(242,139,60,0.4); background: rgba(242,139,60,0.08); }
.rail-ctrl-scale-row {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.25);
    padding: 0 2px 2px;
}
.rail-ctrl-scale {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
    outline: none;
    cursor: pointer;
}
.rail-ctrl-scale::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #f28b3c;
    cursor: pointer;
}
.rail-ctrl-scale::-moz-range-thumb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #f28b3c;
    border: none;
}
/* Category mode toggle — lives above the category list in the Tools panel */
.wf-tools-cats-col {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;   /* width driven by .wf-tools-cats below */
}
.wf-cat-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px 5px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.07);
    color: rgba(255,255,255,.35);
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: color .15s, background .15s;
    margin-bottom: 4px;
    flex-shrink: 0;
}
.wf-cat-mode-btn:hover { color: rgba(255,255,255,.75); background: rgba(255,255,255,.06); }
/* Dots icon visible in text mode (hint: click to switch to icons) */
.wf-cat-mode-btn svg:first-child { display: block; }
.wf-cat-mode-btn svg:last-child  { display: none; }
/* Lines icon visible in icon mode (hint: click to switch back to text) */
.wf-tools-cats-col:has(.wf-tools-cats.is-icon-mode) .wf-cat-mode-btn svg:first-child { display: none; }
.wf-tools-cats-col:has(.wf-tools-cats.is-icon-mode) .wf-cat-mode-btn svg:last-child  { display: block; }

/* ── List view — class-based, applied by JS to .workspace-rail ──────────── */
/* Tools: menu_shell.js already injects .wf-tools-list + .wf-tool-row in list mode.
   app.css styles those correctly. We only need to ensure the cards wrapper
   doesn't impose its own grid on the list wrapper. */
.workspace-rail.is-rail-list .wf-tools-cards {
    display: block !important;
}
/* Ensure the injected .wf-tools-list fills width */
.workspace-rail.is-rail-list .wf-tools-list {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
}
/* Scale drives grid column size — .wf-tools-grid already uses var(--rail-scale, 82px)
   via app.css; .rail-assets-grid uses var(--asset-card-size) set by applyScale() */
/* Media + Renders: grid → single column in list mode */
.workspace-rail.is-rail-list .shell-asset-grid {
    grid-template-columns: 1fr !important;
    gap: 3px !important;
}
/* Each card becomes a horizontal row */
.workspace-rail.is-rail-list .shell-asset-grid .history-asset {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    min-width: 0;
}
/* Small fixed thumbnail on the left */
.workspace-rail.is-rail-list .shell-asset-grid .history-asset-thumb {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    aspect-ratio: unset !important;
    border-radius: 6px;
    flex-shrink: 0;
}
/* Label truncates to remaining width */
.workspace-rail.is-rail-list .shell-asset-grid .history-asset span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
/* Assets in list mode */
.workspace-rail.is-rail-list .rail-assets-grid {
    grid-template-columns: 1fr !important;
}
.workspace-rail.is-rail-list .rail-asset-card {
    flex-direction: row !important;
    height: auto !important;
    padding: 5px 8px !important;
    gap: 8px;
}
.workspace-rail.is-rail-list .rail-asset-img-box {
    width: 28px !important;
    aspect-ratio: 1 !important;
    border-radius: 4px !important;
    flex-shrink: 0;
}
.workspace-rail.is-rail-list .rail-asset-card img {
    width: 70% !important;
    height: 70% !important;
}
.workspace-rail.is-rail-list .rail-asset-card span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    flex: 1;
    min-width: 0;
}

/* ── Assets panel ────────────────────────────────────────────────────────── */
.rail-assets-header {
    padding: 6px 4px 4px;
}
.rail-assets-search {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    padding: 5px 8px;
    outline: none;
}
.rail-assets-search:focus { border-color: rgba(242,139,60,0.5); }
.rail-assets-scale-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px 0;
    color: rgba(255,255,255,0.3);
}
.rail-assets-scale {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
    outline: none;
    cursor: pointer;
}
.rail-assets-scale::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f28b3c;
    cursor: pointer;
}
.rail-assets-scale::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f28b3c;
    border: none;
    cursor: pointer;
}
.rail-assets-cats {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rail-assets-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 0.78rem;
    cursor: pointer;
    text-align: left;
    transition: background .12s, color .12s;
}
.rail-assets-cat:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.78); }
.rail-assets-cat.is-active {
    background: rgba(242,139,60,0.15);
    color: #f28b3c;
    border-left: 2px solid #f28b3c;
    padding-left: 6px;
}
.rail-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--asset-card-size, 70px), 1fr));
    grid-auto-rows: var(--asset-card-size, 70px);
    gap: 6px;
    padding: 8px 4px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    align-content: start;
}
.rail-asset-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 6px 4px 5px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    overflow: hidden;
    height: 100%;    /* fill the grid-auto-row cell */
}
.rail-asset-card:hover {
    background: rgba(242,139,60,0.12);
    border-color: rgba(242,139,60,0.35);
}
/* Image box scales with the card — uses % of card width + aspect-ratio for reliable SVG sizing */
.rail-asset-img-box {
    width: 62%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.rail-asset-card img {
    display: block;
    width: 62%;
    height: 62%;
    object-fit: contain;
}
.rail-asset-card span {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 0 3px;
}

/* ── Splash / Home Screen ─────────────────────────────────────────────── */
/* The home-cinematic surface is now driven by the Cinematic Continuity
   primitives (.cine-dolly-in / .cine-dolly-out) applied by cineSwap() in
   menu_shell.js. Layout-only styles live here; transitions / scale values
   come from var(--cine-*) tokens in static/css/14-cinematic.css.
   See standing-orders.mdc § "Cinematic Continuity". */
.home-cinematic {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #080b10;
}

.splash-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 65% 30%, rgba(242,139,60,0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 18% 78%, rgba(91,156,246,0.07) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.home-cinematic > * { position: relative; z-index: 1; }

/* Header bar */
.splash-header {
    position: absolute;
    top: 20px;
    left: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.splash-logo-mark {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}
.splash-dot { color: #f28b3c; }
.splash-badge {
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(242,139,60,0.14);
    color: #f28b3c;
    border: 1px solid rgba(242,139,60,0.28);
    border-radius: 20px;
    padding: 3px 9px;
}

/* Hero copy */
.splash-hero {
    text-align: center;
    padding: 0 24px;
    max-width: 740px;
    margin-bottom: 22px;
}
.splash-headline {
    font-size: clamp(1.85rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.015em;
}
.splash-headline em { font-style: normal; color: #f28b3c; }
.splash-sub {
    font-size: clamp(0.8rem, 1.3vw, 0.93rem);
    color: rgba(255,255,255,0.52);
    line-height: 1.7;
    margin: 0;
}

/* Recipe reel */
.splash-reel {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 0 28px;
    margin-bottom: 20px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
}
.splash-reel::-webkit-scrollbar { display: none; }
.splash-clip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    outline: none;
}
.splash-clip video {
    width: 118px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 18px rgba(0,0,0,0.55);
    transition: transform 200ms, box-shadow 200ms;
    display: block;
}
.splash-clip:hover video,
.splash-clip:focus video {
    transform: scale(1.06);
    box-shadow: 0 8px 26px rgba(242,139,60,0.28);
}
.splash-clip span {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    transition: color 200ms;
}
.splash-clip:hover span { color: rgba(255,255,255,0.65); }

/* Fact bar */
.splash-facts {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 24px;
}
.splash-fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 18px;
    min-width: 108px;
    text-align: center;
}
.splash-fact strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f28b3c;
    line-height: 1;
}
.splash-fact span {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.38);
    margin-top: 4px;
    line-height: 1.45;
}

/* CTA */
.splash-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.splash-enter-btn {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #f28b3c;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px 36px;
    cursor: pointer;
    transition: background 140ms, transform 120ms, box-shadow 140ms;
    box-shadow: 0 4px 22px rgba(242,139,60,0.38);
}
.splash-enter-btn:hover {
    background: #e07830;
    transform: translateY(-2px);
    box-shadow: 0 7px 28px rgba(242,139,60,0.5);
}
.splash-enter-btn:active { transform: translateY(0); }
.splash-cta-hint {
    font-size: 0.66rem;
    color: rgba(255,255,255,0.26);
    margin: 0;
}

/* Mobile: tighten up spacing on small screens */
@media (max-width: 600px) {
    .splash-headline { font-size: clamp(1.5rem, 7vw, 2rem); }
    .splash-clip video { width: 96px; height: 62px; }
    .splash-fact { min-width: 88px; padding: 8px 12px; }
}
