/*
=========================================================
 SkyReader Slide Show Section

 Deliberately follows the proven Video Viewer / SkyReader
 workspace structure so all three media sections behave and
 feel consistently. The transition engine remains separate
 so visual variations can be added later.
=========================================================
*/

.slideshow-section{
    --slideshow-topbar-height:clamp(44px,5.5vh,68px);
    --slideshow-library-width:360px;
    --slideshow-statusbar-height:clamp(22px,3vh,32px);
    position:fixed;
    inset:0;
    z-index:3000;
    display:none;
    grid-template-rows:var(--slideshow-topbar-height) minmax(0,1fr);
    width:100vw;
    height:100dvh;
    min-width:0;
    min-height:0;
    overflow:hidden;
    background:url("../assets/video-background.jpg") center/cover no-repeat;
  color:var(--text);
}

#slideshowSection.app-section-active{display:grid}
#slideshowSection.app-section-hidden{display:none!important}
.slideshow-section *,.slideshow-section *::before,.slideshow-section *::after{box-sizing:border-box}

/* =========================================================
   FULLSCREEN MEDIA CHROME

   Front Page fullscreen opens the existing Slideshow Viewer
   in the browser fullscreen layer. Slideshows sit against a
   black media background there, so use the dark/glass control
   treatment only while fullscreen. Normal theme behavior is
   unchanged.
========================================================= */
#slideshowViewer:fullscreen{
    --panel:#171a1f;
    --panel2:#111419;
    --text:#f4f6f8;
    --control-bg:rgba(12,15,20,.72);
    --control-text:#f3f6f8;
    --line:rgba(255,255,255,.16);
    background:#000;
    color:#f4f6f8;
}

#slideshowViewer:fullscreen::backdrop{
    background:#000;
}

#slideshowViewer:fullscreen .slideshow-control,
#slideshowViewer:fullscreen .slideshow-audio-mode{
    background:rgba(12,15,20,.72);
    color:#f3f6f8;
    border-color:rgba(255,255,255,.20);
}

#slideshowViewer:fullscreen .slideshow-control .icon,
#slideshowViewer:fullscreen .slideshow-audio-mode .icon,
#slideshowViewer:fullscreen .slideshow-audio-mode select{
    color:#f3f6f8;
}

#slideshowViewer:fullscreen .slideshow-control:hover{
    background:rgba(255,255,255,.16)!important;
}

/* ---------- Top bar ---------- */
.slideshow-top-bar{
    height:var(--slideshow-topbar-height);
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:12px;
  align-items:center;
  padding-inline:clamp(8px,1.5vw,18px);
  background:var(--panel);
  color:var(--text);
  backdrop-filter:blur(14px);
    z-index:50;
}
.slideshow-top-bar-left,.slideshow-top-bar-right{display:flex;align-items:center;min-width:0}
.slideshow-top-bar-left{justify-content:flex-start;gap:7px}
.slideshow-top-bar-right{justify-content:flex-end;gap:8px}
.slideshow-top-bar-title{margin:0;text-align:center;font-size:clamp(15px,2.2vh,22px);font-weight:700;letter-spacing:.4px}
.slideshow-icon-button,.slideshow-narrow-library-toggle{
    width:clamp(30px,4vh,36px);height:clamp(30px,4vh,36px);flex:0 0 auto;padding:0;
    border:0;border-radius:50%;
    background:transparent;color:var(--text);
    display:flex;align-items:center;justify-content:center;cursor:pointer;
    transition:background .2s ease,transform .2s ease,box-shadow .2s ease;
}
.slideshow-icon-button .icon,.slideshow-narrow-library-toggle .icon{width:22px;height:22px}
.slideshow-icon-button:hover,.slideshow-narrow-library-toggle:hover{background:rgba(0,0,0,.06);transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.12)}
.slideshow-icon-button:active,.slideshow-narrow-library-toggle:active{transform:scale(.96)}
.slideshow-narrow-library-toggle{display:none}
.slideshow-library-card:hover{
transform:translateY(-2px)
}


 /* =======================================================
    STANDARD TOP-BAR SEARCH
 ======================================================= */

.slideshow-search-group{
    display:flex;
    align-items:center;

    gap:0;

    width:330px;
    max-width:100%;
    min-width:0;

    color:var(--text);

    position:relative;
    box-sizing:border-box;
}


.slideshow-search-group input{
    display:block;

    flex:1 1 auto;

    width:0;
    min-width:0;

    opacity:0;

    height:34px;

    padding:0;

    box-sizing:border-box;

    border:
        1px solid
        color-mix(
            in srgb,
            var(--control-text) 18%,
            transparent
        );

    outline:0;

    background:var(--control-bg);
    color:var(--control-text);

    font-size:14px;

    border-radius:10px;

    backdrop-filter:blur(10px);

    transition:
        width .22s ease,
        opacity .18s ease,
        padding .22s ease;
}


.slideshow-search-group input::placeholder{
    color:
        color-mix(
            in srgb,
            var(--control-text) 72%,
            transparent
        );
}


.slideshow-search-group input:focus{
    box-shadow:
        0 0 0 2px
        color-mix(
            in srgb,
            var(--control-text) 18%,
            transparent
        );
}


.slideshow-search-group.searchOpen{
    gap:7px;
}


.slideshow-search-group.searchOpen input{
    width:auto;
    opacity:1;
    padding:0 11px;
}


.slideshow-search-group .slideshow-icon-button{
    flex:0 0 auto;
}

/* ---------- Workspace / library ---------- */
.slideshow-workspace{
    grid-row:2;
    position:relative;
    min-width:0;min-height:0;width:100%;height:100%;
    display:flex;flex-direction:row;overflow:hidden;
    padding:0 30px 0 0;background:transparent;
}
.slideshow-library{
    position:relative;z-index:20;
    width:var(--slideshow-library-width);flex:0 0 var(--slideshow-library-width);box-sizing:border-box;
    height:100%;min-width:0;min-height:0;
    /* The 2-column masonry grid now sizes every card to its column's
       width (see .slideshow-library-card), so there is nothing left
       that can overflow horizontally. The panel scrolls vertically
       only, matching the Reader/Video library panels. */
    display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;
    background:transparent;color:var(--text);scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.42) transparent;
    transition:transform .28s cubic-bezier(.25,.8,.25,1),visibility 0s linear 0s;
}

.slideshow-library::-webkit-scrollbar{width:9px}
.slideshow-library::-webkit-scrollbar-track{background:rgba(255,255,255,.10)}
.slideshow-library::-webkit-scrollbar-thumb{background:rgba(255,255,255,.42);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.slideshow-library-header{
    flex:0 0 48px;min-height:48px;width:100%;display:flex;align-items:center;gap:8px;
    padding:8px 12px;position:relative; z-index:100;
}
.slideshow-library-header h2{margin:0;min-width:0;flex:1;color:#fff;font-size:clamp(20px,4vw,30px);line-height:1.2;font-weight:700;text-shadow: 0 1px 4px rgba(0, 0, 0, .65);}
.slideshow-library-header-controls{display:flex;align-items:center;gap:4px;z-index:101;background: rgba(255, 255, 255, .42);border-radius: 10px;}
.slideshow-organization-controls,.slideshow-library-view-controls{display:flex;align-items:center;gap:2px;position:relative;}
.slideshow-org-button,.slideshow-view-button,.slideshow-library-drawer-close{
    width:30px;height:30px;flex:0 0 30px;display:inline-flex;align-items:center;justify-content:center;
    padding:0;border:0;border-radius:8px;background:transparent;color:#fff;cursor:pointer; font-size:clamp(16px, 2.0vw,20px);text-shadow: 0 2px 3px rgba(0, 0, 0, .55);
}
.slideshow-org-button:hover,.slideshow-view-button:hover,.slideshow-view-button.active,.slideshow-library-drawer-close:hover{transform:translateY(-2px);border:1px solid rgba(255,255,255,.18);border-radius:10px;
    box-shadow:0 10px 30px rgba(0,0,0,.3);backdrop-filter:blur(12px)}

/* Larger glyph on mobile so it fills more of the 30px button - the
   clamp() above bottoms out at 16px on narrow screens, matching the
   same mobile increase given to .libraryOrgButton (reader) and
   .video-library-org-button (video.css). Scoped to the sort button
   only, not the view/drawer-close buttons that share the base rule. */
@media (max-width:999px){
    .slideshow-org-button{font-size:26px;}
}
.slideshow-org-button .icon,.slideshow-view-button .icon,.slideshow-library-drawer-close .icon{width:18px;height:18px;filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55));}
.slideshow-library-drawer-close{display:none}
.slideshow-org-menu{
    position:absolute;top:34px;right:0;z-index:80;min-width:170px;padding:8px;
    border:1px solid rgba(255,255,255,.18);border-radius:10px;background:rgba(25,25,25,.94);
    box-shadow:0 10px 30px rgba(0,0,0,.3);backdrop-filter:blur(12px);
    display:flex;flex-direction:column;gap:7px;
}
.slideshow-org-menu.hidden{display:none}
.slideshow-org-menu select{width:100%;min-height:32px;padding:5px 8px;border:1px solid rgba(255,255,255,.15);border-radius:7px;background:rgba(255,255,255,.08);color:#fff;font:inherit}
.slideshow-org-menu option{background:#222;color:#fff}

/*
 * True masonry packing (thumbnails of varying shapes/sizes sitting
 * snugly next to each other, same technique already used for the
 * Reader section's grid view / #shelfView) needs a real CSS multi-column
 * layout - a plain 2-column CSS Grid always keeps a strict row grid, so
 * every card in a row sits as tall as the tallest card in that row,
 * which is the "hangs at the top with gaps underneath" effect that
 * wasn't wanted here.
 *
 * The count-loss bug isn't caused by column-count itself; it's caused
 * by this element being a flex child that flexbox is still allowed to
 * compress to fit its (fixed-height) parent. flex-grow:0 alone doesn't
 * prevent that - flex-shrink is the property that lets a flex item be
 * squeezed below its content size, and it defaults to shrinkable unless
 * set to 0. A shrunk grid feeds the column-balancing algorithm a
 * definite-but-too-short height, which then fragments the overflow into
 * extra, off-screen columns - invisible, and unreachable now that the
 * panel no longer has a horizontal-scroll fallback to reach them.
 * flex-shrink:0 (below) is what actually locks the grid to its full,
 * uncompressed content height, so multi-column always sizes its columns
 * from the real (full) content height, and the parent's normal
 * overflow-y:auto scrollbar reveals everything instead.
 */
.slideshow-library-grid{
    display:block;
    column-count:2;
    column-gap:10px;
    height:auto;
position:relative;flex:0 0 auto;width:100%;min-width:0;min-height:0;padding:2px 10px 30px;align-content:start
}


.slideshow-library-grid[data-view="list"]{display:flex;flex-direction:column;gap:10px;padding:10px 14px 30px}

.slideshow-library-card{
/* width must fill the column (not fit-content, which sizes to the
   card's intrinsic/native image width) or a wide source image makes
   the card wider than its column, pushing the whole grid past the
   panel's fixed width and forcing it into horizontal scroll instead
   of the intended 2-column vertical masonry. */
position:relative;    height: fit-content;
    width: 100%;
    margin-bottom: 10px;border:0;border-radius:20px;background:var(--panel2);color:var(--text);text-align:left;cursor:pointer
}

.slideshow-library-card-media{position:relative;width:100%;overflow:hidden;border-radius:20px;background:rgba(0,0,0,.25);box-shadow:0 3px 12px rgba(0,0,0,.25)}

.slideshow-library-card-media img{display:block;width:100%;object-fit:contain}
.slideshow-library-card-info{padding:6px 34px 5px 2px;display:flex;flex-direction:column;gap:3px}

.slideshow-library-grid[data-view="grid"] .slideshow-library-card-info {align-items:center; text-align:center; margin:0; padding:5px 10px}

.slideshow-library-card-info strong{font-size:13px;line-height:1.2}
/* Category line: was fixed light text, which vanished on the light
   card background; use the theme's muted text colour like the Reader
   panel cards. */
.slideshow-library-card-info span{font-size:11px;color:var(--muted,rgba(255,255,255,.72));font-weight:550;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.slideshow-library-card.selected .slideshow-library-card{box-shadow:
        0 0 0 3px #66CDAA,
        0 8px 24px rgba(0,0,0,.4);
}

.slideshow-library-card.selected .slideshow-library-card-media{box-shadow:
        0 0 0 3px #66CDAA,
        0 8px 24px rgba(0,0,0,.4);
}
.slideshow-favorite-control{position:absolute;right:clamp(6px,6%,10px);top:clamp(6px,6%,10px);z-index:15;width:25px;height:25px;display:flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:color-mix(in srgb,var(--card,#222) 30%,transparent);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);color:var(--text,#fff);font-size:16px;line-height:1;cursor:pointer;transition:transform .2s ease,color .2s ease,background .2s ease}
.slideshow-favorite-control:hover{transform:scale(1.08)}
.slideshow-favorite-control.is-favorite{color:#e0435c}
.slideshow-library-grid[data-view="list"] .slideshow-library-card{width:100%;display:flex;align-items:center;gap:12px}
.slideshow-library-grid[data-view="list"] .slideshow-library-card-media{width:110px;height:68px;flex:0 0 110px;aspect-ratio:auto}
.slideshow-library-grid[data-view="list"] .slideshow-library-card-info{padding:0;min-width:0;flex:1}
.slideshow-library-empty{padding:24px 14px;text-align:center;color:rgba(255,255,255,.72);font-size:13px}

/* ---------- Viewer ---------- */
.slideshow-viewer{
    --slideshow-statusbar-height:clamp(22px,3vh,32px);
    position:relative;flex:1 1 auto;width:0;min-width:0;min-height:0;height:95%;    top: 50%;
    transform: translateY(-50%);
    padding-bottom:var(--slideshow-statusbar-height);
    display:flex;align-items:center;justify-content:center;overflow:hidden;background:transparent;
    border-radius: 10px;
}

/* Landing is intentionally the same 60% centered treatment as Video Viewer.
   top is centered between the bottom of the top bar (top:0 of
   .slideshow-viewer, its containing block) and the top of the indicator
   bar (--slideshow-statusbar-height above the welcome banner, at the very
   bottom of .slideshow-viewer) — see the matching comment in video.css. */
.slideshow-landing{
    position:absolute;left:50%;
    top:calc(50% - (var(--slideshow-statusbar-height,28px) + var(--slideshow-welcome-height,22px)) / 2);
    width:calc((100% - 32px) * .9);height:55%;min-width:0;min-height:0;max-width:100%;
    margin:0;transform:translate(-50%,-50%);padding:clamp(20px,4vw,46px);
    display:flex;flex-direction:column;overflow:hidden;border-radius:20px;
      background:color-mix(in srgb,var(--panel) 55%,transparent);
  color:var(--text);z-index:6;
    opacity:1;visibility:visible;pointer-events:auto;
    /* Timing/easing matches .sky-share-closed-go-button.sky-share-go-float-in
       (skyShareGoFloatIn, share.css) - same float-in feel as Share Mode's
       go-button, just moving up from below (see .slideshow-landing.hidden's
       transform below) instead of in from the left. */
    transition:opacity 650ms cubic-bezier(0.16, 1, 0.3, 1),transform 650ms cubic-bezier(0.16, 1, 0.3, 1),visibility 0s linear 0s;
}
.slideshow-landing.hidden,.slideshow-section.slideshow-library-open .slideshow-landing{opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,calc(-50% + 70px)) scale(.985)}
.slideshow-landing-hero{flex:0 0 25%;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;gap:16px;text-align:left}
.slideshow-landing-logo{width:58px;height:58px;flex:0 0 58px;object-fit:contain;border-radius:18px;background:color-mix(in srgb,var(--panel,#1c2026) 55%,transparent);padding:9px}
.slideshow-landing-hero h2{margin:0;color:var(--text);font-size:clamp(30px,4vw,55px);line-height:1.05;font-weight:700;letter-spacing:-.02em}
.slideshow-landing-hero p{margin:4px 0 0;color:var(--muted);font-size:14px}
.slideshow-landing-section{flex:1 1 75%;min-height:0;overflow:hidden;justify-content:center;align-items:center}
.slideshow-landing-section h3{margin:0 0 6px;color:var(--text);font-size:clamp(15px,4vw,25px);line-height:1.2;font-weight:600}
.slideshow-landing-row{  display:flex;

  align-items:center;
  justify-content:center;

  gap:14px;

  width:100%;
  height:100%;

  min-width:0;
  min-height:0;

  margin:0;
  padding:0;

  overflow:hidden;

  border:0;
  border-radius:0;

  background:transparent;

  color:inherit;

  font:inherit;

  text-align:left;

  cursor:pointer;

  transition:
    transform .22s ease}
.slideshow-landing-card{
    position:relative;
    align-items: center;
    display:flex;
    flex-direction:column;

    gap:6px;

    min-width:0;
    max-width:100px;

    border:0;
    border-radius:0;

    padding:0;

    overflow:visible;

    background:transparent;

    color:inherit;

    text-align:left;

    cursor:pointer;

    transition:transform .22s ease;
}
.slideshow-landing-card:hover{transform:translateY(-2px)}
.slideshow-landing-card-thumbnail{
    display:block;

    width:100%;

    aspect-ratio:4/3;

    object-fit:cover;

    border-radius:10px;

    box-shadow:0 3px 12px rgba(0,0,0,.25);
}
.slideshow-landing-card-title{
    display:block;

    min-width:0;
    max-width:100%;

    color:var(--text);

    font-size:12px;
    font-weight:600;

    line-height:1.25;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* Smaller, muted release date beneath the title - see
   DateDisplay.format() (js/dateDisplay.js) for the actual
   "Sep 5th, 2026" / "5 days ago" text this holds. */
.slideshow-landing-card-date{
    display:block;

    min-width:0;
    max-width:100%;

    margin-top:-2px;

    color:var(--muted);

    font-size:10px;
    font-weight:400;

    line-height:1.2;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* =========================================================
   LANDING LIBRARY — FAVORITE ICON
   Uses the same favorite-control contract as the full
   slideshow library.

   The control is intentionally positioned over the thumbnail
   so it remains visible without changing the card dimensions.
========================================================= */

.slideshow-landing-card .slideshow-favorite-control{
    position:absolute;

    right:6px;
    top:6px;

    z-index:20;

    width:26px;
    height:26px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:0;

    border:0;
    border-radius:50%;

    background:color-mix(
        in srgb,
        var(--card,#222) 38%,
        transparent
    );

    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);

    color:var(--text,#fff);

    font-size:16px;
    line-height:1;

    cursor:pointer;

    box-shadow:0 2px 8px rgba(0,0,0,.25);

    transition:
        transform .2s ease,
        color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.slideshow-landing-card .slideshow-favorite-control:hover{
    transform:scale(1.08);

    background:color-mix(
        in srgb,
        var(--card,#222) 55%,
        transparent
    );

    box-shadow:0 3px 10px rgba(0,0,0,.35);
}

.slideshow-landing-card .slideshow-favorite-control.is-favorite{
    color:#e0435c;
}

/*
 * Make sure the favorite button remains above the thumbnail
 * but does not interfere with the card title.
 */
.slideshow-landing-card .slideshow-landing-card-thumbnail{
    position:relative;
}

/* Slightly smaller control on very narrow phones. */
@media (max-width:480px){
    .slideshow-landing-card .slideshow-favorite-control{
        width:24px;
        height:24px;
        right:5px;
        top:5px;
        font-size:15px;
    }
}


#slideshowLandingLibrary .slideshow-landing-card .slideshow-favorite-control{
    position:absolute;
    top:6px;
    right:6px;
    z-index:20;
    width:25px;
    height:25px;
}


.slideshow-landing-media-row{flex:0 0 25%;min-height:0;width:100%;display:flex;justify-content:center;overflow:hidden;transition:flex-basis .3s ease,height .3s ease,padding .3s ease}
.slideshow-landing-continue-section{width:100%;padding:10px}
.slideshow-landing-library-section{flex:1 1 50%; height:100%; transition:flex-basis .3s ease}

/*
 * No View Again card to show — collapse the media row entirely so
 * the library section's flex-grow fills the freed space up to the
 * hero instead of leaving a gap.
 */
.slideshow-landing-media-row.is-empty{flex:0 0 0;height:0;padding:0;overflow:hidden}


/* =======================================================
   LAST VIEWED CARD

   Mirrors SkyReader's Read Again card exactly: thumbnail
   on the left, title and a "last viewed" line stacked
   to the right — no text on the thumbnail itself.
======================================================= */

.slideshow-landing-recent-card{
    display:flex;

    align-items:center;
    justify-content:center;

    gap:14px;

    width:100%;
    height:100%;

    max-width:min(560px,100%);

    min-width:0;
    min-height:0;

    margin:0 auto;
    padding:
        clamp(7px,1vh,12px)
        clamp(10px,1.5vw,16px);

    box-sizing:border-box;

    overflow:hidden;

    border:0;
    border-radius:16px;

    background:var(--card);

    color:inherit;

    font:inherit;

    text-align:left;

    cursor:pointer;

    box-shadow:var(--soft-shadow);

    transition:
        transform .22s ease,
        box-shadow .22s ease;
}

.slideshow-landing-recent-card:hover{
    transform:translateY(-2px);

    box-shadow:var(--hover-shadow);
}

.slideshow-landing-recent-thumbnail{
    display:block;

    flex:0 0 auto;

    width:auto;
    height:auto;

    max-width:25%;
    max-height:100%;

    object-fit:contain;

    padding:5px;
    margin-top:3px;

    box-sizing:border-box;

    border-radius:15px;
}

.slideshow-landing-recent-info{
    display:flex;

    flex:1 1 auto;
    flex-direction:column;
    justify-content:center;

    gap:3px;

    min-width:0;

    overflow:hidden;
}

.slideshow-landing-recent-title,
.slideshow-landing-recent-subtitle{
    min-width:0;
    max-width:100%;

    overflow:hidden;

    text-overflow:ellipsis;
    white-space:nowrap;
}

.slideshow-landing-recent-title{
    color:var(--text);

    font-size:clamp(13px,1.6vw,18px);

    font-weight:700;

    line-height:1.2;
}

.slideshow-landing-recent-title::before{
    content:"View Again: ";
}

.slideshow-landing-recent-subtitle{
    font-size:12px;

    color:var(--muted);
}

/* Playback stage and controls are hidden until a show is actually selected. */
.slideshow-stage,.slideshow-viewer-title,.slideshow-toolbar,.slideshow-playback-status{display:none!important}
.slideshow-viewer.has-slideshow .slideshow-stage,.slideshow-viewer.has-slideshow .slideshow-viewer-title,.slideshow-viewer.has-slideshow .slideshow-toolbar,.slideshow-viewer.has-slideshow .slideshow-status-bar,.slideshow-viewer.has-slideshow .slideshow-playback-status{display:flex!important}
.slideshow-viewer.has-slideshow .slideshow-status-bar{display:block}
.slideshow-viewer-title{position:absolute;left:18px;top:16px;z-index:5;margin:0;max-width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(20px,3.5vw,28px);color:#fff; text-shadow:0 1px 4px rgba(0,0,0,.65);font-weight:700;pointer-events:none}
.slideshow-stage{position:relative;width:min(1100px,100%);height:auto;aspect-ratio:16/9;max-height:calc(100dvh - var(--slideshow-topbar-height) - 110px);min-height:220px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:10px}
.slideshow-slide{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:10px;opacity:1;transition:opacity .42s ease}
.slideshow-slide img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;user-select:none}.slideshow-slide canvas{max-width:100%;max-height:100%;width:auto;height:auto;display:block;user-select:none}
.slideshow-caption{position:absolute;left:0;right:0;bottom:0;padding:12px 16px;background:none;font-size:14px;text-align:center}
.slideshow-playback-status{position:absolute;top:30px;left:50%;transform:translateX(-50%);font-size:12px;opacity:.72;z-index:8;pointer-events:none}
.slideshow-toolbar{position:absolute;display:flex;gap:6px;align-items:center;padding:6px 8px;border-radius:10px;
  background:transparent;
  color:var(--control-text)}

.slideshow-toolbar-main{bottom:0;left:50%;transform:translateX(-50%)}

.slideshow-toolbar-secondary{top:8px;right:12px;}



.slideshow-control{width:42px;height:42px;flex:0 0 42px;bottom:10px;border:1px solid color-mix(in srgb,var(--control-text) 22%,transparent);border-radius:50%;background:color-mix(in srgb,var(--panel) 22%,transparent);color:var(--control-text);backdrop-filter:blur(7px);box-shadow:0 5px 18px rgba(0,0,0,.16);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .25s,transform .25s,box-shadow .25s}

.slideshow-control .icon{width:20px;height:20px;color:var(--control-text);stroke:currentColor}
.slideshow-control:hover{background:rgba(255,255,255,.42)!important;transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.18)}
.slideshow-control:active{transform:scale(.96)}

@media (max-width:700px){
  .slideshow-toolbar-secondary{
    top:12px;
    left:50%;
    right:auto;
    width:max-content;
    max-width:calc(100vw - 20px);
    padding-left:10px;
    padding-right:10px;
    transform:translateX(-50%);
    justify-content:center;
    box-sizing:border-box;
  }

.slideshow-playback-status{
    top:60px;
}

}


.slideshow-audio-mode{position:relative;height:42px;display:flex;align-items:center;gap:4px;padding:0 8px;border:1px solid color-mix(in srgb,var(--control-text) 22%,transparent);border-radius:21px;background:color-mix(in srgb,var(--panel) 22%,transparent);color:var(--control-text);backdrop-filter:blur(7px);box-shadow:0 5px 18px rgba(0,0,0,.16)}
.slideshow-audio-mode .icon{width:19px;height:19px;color:var(--control-text)}.slideshow-audio-mode select{max-width:118px;border:0;outline:0;background:transparent;color:var(--control-text);font-size:11px}.slideshow-audio-mode option{background:#20242a;color:#fff}

.slideshow-music-picker{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    z-index:50;
    width:220px;
    max-width:min(220px,calc(100vw - 24px));
    max-height:280px;
    display:flex;
    flex-direction:column;
    border:1px solid color-mix(in srgb,var(--control-text) 22%,transparent);
    border-radius:14px;
    background:color-mix(in srgb,var(--panel) 92%,transparent);
    backdrop-filter:blur(12px);
    box-shadow:0 12px 34px rgba(0,0,0,.28);
    overflow:hidden;
}
.slideshow-music-picker[hidden]{display:none;}
.slideshow-music-picker-search{
    flex:0 0 auto;
    margin:8px;
    height:32px;
    padding:0 10px;
    border:1px solid color-mix(in srgb,var(--text) 18%,transparent);
    border-radius:8px;
    background:var(--control-bg);
    color:var(--control-text);
    font-size:12px;
    outline:none;
}
.slideshow-music-picker-list{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    padding:0 6px 6px;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.slideshow-music-picker-item{
    flex:0 0 auto;
    width:100%;
    padding:8px 10px;
    border:0;
    border-radius:8px;
    background:transparent;
    color:var(--text);
    font-size:13px;
    text-align:left;
    cursor:pointer;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.slideshow-music-picker-item:hover{background:color-mix(in srgb,var(--text) 8%,transparent);}
.slideshow-music-picker-item.is-selected{background:color-mix(in srgb,var(--text) 12%,transparent);font-weight:600;}
.slideshow-music-picker-empty{padding:14px 10px;font-size:12px;color:var(--muted);text-align:center;}
.slideshow-status-bar{position:absolute;left:0;right:0;bottom:0;z-index:50;min-height:var(--slideshow-statusbar-height);padding:10px;font-size:13px;letter-spacing:.02em;color:var(--text)}
.slideshow-status-bar center{display:flex;align-items:center;justify-content:center;gap:14px}

/* ---------- Mobile drawer, following Video Viewer behavior ---------- */
@media(max-width:700px){
    .slideshow-top-bar{grid-template-columns:1fr auto 1fr;padding:5px 8px}
    .slideshow-top-bar-title{font-size:16px}
    .slideshow-narrow-library-toggle{display:flex}
    .slideshow-workspace{display:block;padding:0}
    .slideshow-library{position:absolute;left:0;top:0;bottom:0;width:min(88vw,360px);z-index:30;transform:translateX(-105%);transition:transform .28s ease;box-shadow:8px 0 25px rgba(0,0,0,.3)}
    .slideshow-section.slideshow-drawer-open .slideshow-library{transform:translateX(0)}

/* Hide the narrow-library toggle while the slideshow drawer is open. */
@media (max-width:700px){
    .slideshow-section.slideshow-drawer-open
    .slideshow-top-bar .slideshow-narrow-library-toggle{
        opacity:0 !important;
        visibility:hidden !important;
        pointer-events:none !important;
    }
}

    .slideshow-library-drawer-close{display:inline-flex}
    .slideshow-viewer{width:100%;padding:14px 8px 58px}
    /* width:100% matches #viewerLibrary (style.css, 999px breakpoint) and
       .video-landing (video.css, 999px breakpoint) - full-bleed on mobile
       so all three landings occupy the same screen width. */
    .slideshow-landing{width:90%;height:60%;padding:20px}
    .slideshow-landing-hero{gap:10px}.slideshow-landing-logo{width:50px;height:50px;flex-basis:50px}
    .slideshow-landing-hero h2{font-size:clamp(24px,7vw,35px)}
    .slideshow-landing-hero p{font-size:11px; color:var(--muted)}
    .slideshow-landing-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .slideshow-stage{width:100%;height:auto;aspect-ratio:16/9;min-height:0;max-height:calc(100dvh - var(--slideshow-topbar-height) - 82px)}

    .slideshow-toolbar-main{max-width:calc(100% - 12px);overflow-x:auto}.slideshow-toolbar-secondary{top:8px;right:8px}.slideshow-control{width:34px;height:34px;flex:0 0 34px}
.slideshow-viewer.has-slideshow .slideshow-stage{
        height:calc(100% - 104px)!important;
        max-height:calc(100% - 104px)!important;
    }
    .slideshow-viewer.has-slideshow .slideshow-toolbar-main{bottom:6px}
    .slideshow-viewer.has-slideshow .slideshow-toolbar-secondary{top:6px}
    .slideshow-audio-mode select{max-width:100px}.slideshow-search-group.searchOpen input{width:min(190px,48vw)}
}



/* =======================================================
   TOP BAR HEIGHT — matches Reader's shrink at ≤600px
======================================================= */

@media (max-width:600px){
    .slideshow-section{
        --slideshow-topbar-height:clamp(44px,5.5vh,68px);
    }
}


/* =========================================================
   NARROW TOP BAR — compact navigation + drawer toggle
   ========================================================= */
@media (max-width:700px){
    .slideshow-top-bar{grid-template-columns:auto minmax(0,1fr) auto;gap:5px;padding-inline:5px;overflow:visible}
    .slideshow-top-bar-left{
    min-width:0;
    flex:1 1 auto;
    display:flex;
    align-items:center;
    gap:3px;
}
    .slideshow-top-bar-right{min-width:0;max-width:44vw;gap:4px;position:relative}
    .slideshow-top-bar-right .app-switcher{display:none}
    .slideshow-top-bar-right .responsive-app-menu-button{display:inline-flex}
    .slideshow-narrow-library-toggle{display:flex;position:relative;left:auto;top:auto;width:34px;height:34px;flex:0 0 34px}
        .slideshow-search-group{
        min-width:34px;
        max-width:none;
        flex:1 1 auto;
    }

    .slideshow-search-group.searchOpen input{
        width:auto;
        max-width:100%;
        flex:1 1 auto;
    }
}
@media (max-width:480px){
    .slideshow-top-bar{gap:3px;padding-inline:3px}
    .slideshow-top-bar-right{gap:2px;max-width:40vw}
    .slideshow-top-bar-right .slideshow-icon-button{width:32px;height:32px}
    .slideshow-narrow-library-toggle{width:32px;height:32px;flex-basis:32px}
}

/* Use the full available viewer area for normal slide-show playback. */
.slideshow-stage{
    width:calc(100% - 16px);
    height:calc(100% - 16px);
    max-width:calc(100% - 16px);
    max-height:calc(100% - 16px);
    min-height:0;
    aspect-ratio:auto;
}
.slideshow-slide img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}

/* Final slide-show playback sizing: use essentially the whole viewer area. */
.slideshow-viewer.has-slideshow .slideshow-stage{
  width:calc(100% - 16px)!important;
  height:calc(100% - 116px)!important;
  max-width:calc(100% - 16px)!important;
  max-height:calc(100% - 116px)!important;
  min-width:0!important;
  min-height:0!important;
  aspect-ratio:auto!important;
}
.slideshow-viewer.has-slideshow .slideshow-toolbar-main{bottom:8px}
.slideshow-viewer.has-slideshow .slideshow-toolbar-secondary{top:8px}
.slideshow-viewer.has-slideshow .slideshow-slide img{
  width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;
}


/* =========================================================
   LANDING LIBRARY — horizontal scrolling at every viewport
   ========================================================= */
.slideshow-landing-library-section{
    min-width:0;
    min-height:0;
    overflow:hidden;
}

#slideshowLandingLibrary.slideshow-landing-row{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    align-items:center !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    gap:14px !important;
    padding:4px 4px 10px !important;
    box-sizing:border-box;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.42) rgba(255,255,255,.10);
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
}

#slideshowLandingLibrary.slideshow-landing-row::-webkit-scrollbar{height:8px;}
#slideshowLandingLibrary.slideshow-landing-row::-webkit-scrollbar-track{background:rgba(255,255,255,.10);}
#slideshowLandingLibrary.slideshow-landing-row::-webkit-scrollbar-thumb{background:rgba(255,255,255,.42);border-radius:999px;}

#slideshowLandingLibrary .slideshow-landing-card{
    flex:0 0 clamp(100px,12vw,150px) !important;
    width:clamp(100px,12vw,150px) !important;
    max-width:none !important;
    min-width:clamp(100px,12vw,150px) !important;
}

@media (max-width:999px){
    #slideshowLandingLibrary .slideshow-landing-card{
        flex-basis:clamp(100px,22vw,145px) !important;
        width:clamp(100px,22vw,145px) !important;
        min-width:clamp(100px,22vw,145px) !important;
    }
}

@media (max-width:700px){
    #slideshowLandingLibrary.slideshow-landing-row{
        display:flex !important;
        flex-wrap:nowrap !important;
        justify-content:flex-start !important;
        overflow-x:auto !important;
        overflow-y:hidden !important;
        gap:10px !important;
    }
    #slideshowLandingLibrary .slideshow-landing-card{
        flex:0 0 clamp(96px,30vw,135px) !important;
        width:clamp(96px,30vw,135px) !important;
        min-width:clamp(96px,30vw,135px) !important;
    }
}

@media (max-width:480px){
    #slideshowLandingLibrary .slideshow-landing-card{
        flex-basis:clamp(92px,34vw,125px) !important;
        width:clamp(92px,34vw,125px) !important;
        min-width:clamp(92px,34vw,125px) !important;
    }
}

/* =========================================================
   SHARED MEDIA TOP-BAR STANDARD — final override
   ========================================================= */

.slideshow-section{
  --slideshow-topbar-height:var(--media-topbar-height,clamp(44px,5.5vh,68px));
}
.slideshow-top-bar{
  height:var(--slideshow-topbar-height)!important;
  min-height:var(--slideshow-topbar-height)!important;
}
.slideshow-top-bar-right .responsive-app-menu-button{
  height:var(--media-topbar-button-height,42px)!important;
  min-height:var(--media-topbar-button-height,42px)!important;
  flex:0 1 auto;
}
.slideshow-narrow-library-toggle{
  width:var(--media-topbar-button-height,42px)!important;
  height:var(--media-topbar-button-height,42px)!important;
  min-width:var(--media-topbar-button-height,42px)!important;
  min-height:var(--media-topbar-button-height,42px)!important;
  flex:0 0 var(--media-topbar-button-height,42px)!important;
  border-radius:7px!important;
}



/* =========================================================
   SLIDESHOW TOP BAR — FINAL CENTERING / CONTAINMENT FIX

   Grid preserves the existing left / center / right layout.
   The top bar has NO vertical padding so the 42px controls
   can always fit completely inside the bar.
========================================================= */

.slideshow-top-bar {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;

  height: var(--slideshow-topbar-height) !important;
  min-height: var(--slideshow-topbar-height) !important;

  align-items: center !important;

  padding-top: 0 !important;
  padding-bottom: 0 !important;

  box-sizing: border-box !important;
}

/* Keep the three regions vertically centered */
.slideshow-top-bar-left,
.slideshow-top-bar-title,
.slideshow-top-bar-right {
  align-self: center !important;
}

.slideshow-top-bar-left,
.slideshow-top-bar-right {
  display: flex !important;
  align-items: center !important;
}

/* Left controls remain on the left */
.slideshow-top-bar-left {
  justify-content: flex-start !important;
}

/* Right controls remain on the right */
.slideshow-top-bar-right {
  justify-content: flex-end !important;
}

/* =========================================================
   SLIDESHOW TOP BAR CONTROLS
   Only actual top-bar controls.
   DO NOT target every button inside the top bar because
   the responsive app menu contains its own buttons.
========================================================= */

.slideshow-narrow-library-toggle,
.slideshow-top-bar > .slideshow-top-bar-left .slideshow-icon-button,
.slideshow-top-bar > .slideshow-top-bar-right > .responsive-app-menu-button,
.slideshow-top-bar > .slideshow-top-bar-right > .slideshow-icon-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin-top: 0 !important;
  margin-bottom: 0 !important;

  box-sizing: border-box !important;
  line-height: 1 !important;
}


/* =========================================================
   NARROW SLIDESHOW TOP BAR
========================================================= */

@media (max-width:700px) {
  .slideshow-top-bar {
    grid-template-columns: auto minmax(0,1fr) auto !important;

    padding-left: 5px !important;
    padding-right: 5px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;

    gap: 5px !important;
  }

  .slideshow-top-bar-left {
    min-width: 0;
    gap: 3px;
  }

  .slideshow-top-bar-right {
    min-width: 0;
    max-width: 44vw;
    gap: 4px;
  }

  .slideshow-narrow-library-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
  }
}

@media (max-width:480px) {
  .slideshow-top-bar {
    grid-template-columns: auto minmax(0,1fr) auto !important;

    padding-left: 3px !important;
    padding-right: 3px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;

    gap: 3px !important;
  }

  .slideshow-top-bar-left {
    gap: 3px;
  }

  .slideshow-top-bar-right {
    max-width: 40vw;
    gap: 2px;
  }
}


/* =========================================================
   RESPONSIVE APP MENU — MOBILE ONLY
   At wide widths, use the normal .app-switcher instead.
   Applies to Reader, Video, Slideshow, and other media areas.
   ========================================================= */

@media (min-width:701px){

  /* Hide the responsive dropdown itself everywhere */
  .responsive-app-menu,
  .responsive-app-menu.is-open{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  /* Hide its mobile trigger everywhere */
  .responsive-app-menu-button{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

}


/* =========================================================
   RESPONSIVE APP MENU — NARROW SCREENS ONLY
   ========================================================= */

@media (max-width:700px){

  /* Mobile trigger is allowed */
  .responsive-app-menu-button{
    display:flex!important;
    visibility:visible!important;
    pointer-events:auto!important;
    align-items:center!important;
    justify-content:center!important;
  }

  /* Menu only appears when opened */
  .responsive-app-menu{
    display:none!important;
    visibility:hidden;
    pointer-events:none;
  }

  .responsive-app-menu.is-open{
    display:flex!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }

}



/* =========================================================
   NARROW LIBRARY TOGGLE — MOBILE ONLY
   ========================================================= */

/* Hidden at wider widths */
@media (min-width:701px) {
  .slideshow-top-bar .slideshow-narrow-library-toggle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Visible only on narrow screens */
@media (max-width:700px) {
  .slideshow-top-bar .slideshow-narrow-library-toggle {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    align-items: center !important;
    justify-content: center !important;
  }
}
/* =========================================================
   MEDIA ZOOM
   Ctrl + mouse wheel on desktop; two-finger pinch on touch.
   The indicator appears only while content is zoomed.
========================================================= */
.skymedia-zoom-container{
    touch-action:none;
    position:relative;
}
.skymedia-zoom-target{
    will-change:transform;
    cursor:default;
}
.skymedia-zoom-container.is-zoomed .skymedia-zoom-target{
    cursor:grab;
}
.skymedia-zoom-container.is-zoomed .skymedia-zoom-target:active{
    cursor:grabbing;
}
.skymedia-zoom-indicator{
    position:absolute;
    top:10px;
    left:10px;
    width:32px;
    height:32px;
    z-index:60;
    pointer-events:none;
    border-radius:50%;
    background:transparent;
    border:1px solid color-mix(in srgb,var(--control-text,#222) 25%,transparent);
    box-shadow:0 4px 14px rgba(0,0,0,.22);
    backdrop-filter:blur(7px);
}
.skymedia-zoom-indicator::before{
    content:"";
    position:absolute;
    width:13px;
    height:13px;
    left:7px;
    top:6px;
    border:2px solid currentColor;
    border-radius:50%;
    box-sizing:border-box;
}
.skymedia-zoom-indicator::after{
    content:"+";
    position:absolute;
    left:8px;
    top:1px;
    width:11px;
    height:15px;
    font:700 12px/15px Arial,sans-serif;
    text-align:center;
    color:currentColor;
    transform:translate(0,0);
}
.skymedia-zoom-indicator{
    color:var(--control-text,#222);
}


/* =========================================================
   SKYMEDIA WELCOME BANNER + STATUS BAR
   Final baseline override
   Keeps both elements inside the visible dynamic viewport.
========================================================= */

.slideshow-viewer{
    --slideshow-welcome-height:22px;
    --slideshow-statusbar-height:28px;

    top:0;
    transform:none;
    height:100%;
    padding-bottom:calc(
        var(--slideshow-statusbar-height) +
        var(--slideshow-welcome-height)
    );
}

/* Status/indicator row sits immediately above the welcome banner. */
.slideshow-status-bar{
    position:absolute;
    left:0;
    right:0;
    bottom:var(--slideshow-welcome-height);
    height:var(--slideshow-statusbar-height);
    min-height:var(--slideshow-statusbar-height);
    padding:2px 8px;
    box-sizing:border-box;
    display:block;
    font-size:13px;
    line-height:18px;
    letter-spacing:.02em;
    color:var(--text);
    z-index:50;
    background: var(--panel);

}

.slideshow-status-bar center{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin:0;
    font-size:13px;
    line-height:18px;
    letter-spacing:.02em;
}

.slideshow-status-bar span{
    font-size:13px;
    line-height:18px;
    letter-spacing:.02em;
}

.slideshow-status-bar #slideshowStatus{
    font-weight:600;
    opacity:.85;
    max-width:60vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.slideshow-status-indicator{
    opacity:.7;
    min-width:50px;
    text-align:center;

    /* Matches #pageIndicator (reader.css) and .video-status-indicator
       (video.css) - same light outline/pill treatment for consistency
       across all three sections. */
    border:1px solid color-mix(in srgb,var(--muted) 28%,transparent);
    background:color-mix(in srgb,var(--panel) 72%,transparent);
    padding:2px 8px;
    border-radius:7px;
}

/* When there's no index/count to show, the indicator is left with an
   empty textContent (see slideshowViewer.js updateStatus()). Collapsing
   it here - rather than leaving an empty, still-occupying box - lets the
   flex row's own centering (justify-content:center, gap) re-center the
   status message on the bar instead of off-center around a phantom
   sibling. Same fix as .video-status-indicator:empty in video.css. */
.slideshow-status-indicator:empty{
    display:none;
}

/* The welcome banner is part of the workspace bottom edge. */
.slideshow-viewer > .sr-welcome-banner{
    position:absolute;
    left:0;
    right:0;
    bottom:env(safe-area-inset-bottom, 0px);
    height:var(--slideshow-welcome-height);
    min-height:var(--slideshow-welcome-height);
    padding:2px 8px;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:var(--panel);
    color:var(--muted);
    border-top:none;
    font-size:12px;
    line-height:18px;
    letter-spacing:normal;
    z-index:51;
}

.slideshow-viewer > .sr-welcome-banner center{
    display:block;
    width:100%;
    margin:0;
    padding:0;
    line-height:18px;
    text-align:center;
}

/* Keep the playback toolbar clear of the status + welcome rows. */
.slideshow-viewer.has-slideshow .slideshow-toolbar-main{
    bottom:58px;
}

@media(max-width:700px){
    .slideshow-viewer.has-slideshow .slideshow-toolbar-main{
        bottom:58px;
    }

    /*
     * On mobile the status bar already identifies the current
     * slideshow, so the large title above the stage is unnecessary
     * and can consume valuable vertical space.
     */
    .slideshow-viewer.has-slideshow .slideshow-viewer-title{
        display:none!important;
    }
}

/* =========================================================
   SLIDESHOW AUDIO CUE
   Appears when continuous audio is available but the browser
   requires a user gesture before playback can begin.

   The cue automatically fades out after 5 seconds.
========================================================= */

@keyframes slideshowAudioCueTimeout{
    0%{
        opacity:1;
        visibility:visible;
    }

    82%{
        opacity:1;
        visibility:visible;
    }

    100%{
        opacity:0;
        visibility:hidden;
    }
}

.slideshow-audio-cue{
    position:absolute;
    top:72px;
    left:50%;
    transform:translateX(-50%);
    z-index:95;

    max-width:min(90vw,520px);

    padding:7px 14px;

    border-radius:999px;

    font-size:13px;
    line-height:1.25;

    text-align:center;

    color:var(--text);
    background:var(--panel);

    pointer-events:none;

    box-shadow:0 2px 10px rgba(0,0,0,.18);

    white-space:nowrap;

    /*
     * The animation runs for exactly 5 seconds and then leaves
     * the cue invisible.
     */
    animation:slideshowAudioCueTimeout 5s ease forwards;
}

.slideshow-audio-cue.is-audio-prompt{
    font-weight:600;
}

/* Share Mode positioning */
body.sky-share-mode .slideshow-audio-cue{
    top:72px;
    z-index:95;
}

/* Mobile */
@media (max-width:700px){

    .slideshow-audio-cue{
        top:64px;

        max-width:calc(100vw - 32px);

        padding:6px 11px;

        font-size:12px;
    }

    body.sky-share-mode .slideshow-audio-cue{
        top:64px;
    }
}


/* =========================================================
   SLIDESHOW — 10 SECOND TOOLBAR TIMEOUT
   ========================================================= */

#slideshowViewer.slideshow-toolbar-hidden .slideshow-toolbar-main,
#slideshowViewer.slideshow-toolbar-hidden .slideshow-toolbar-secondary {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition:
        opacity .35s ease,
        visibility .35s ease;
}

#slideshowViewer .slideshow-toolbar-main,
#slideshowViewer .slideshow-toolbar-secondary {
    transition:
        opacity .35s ease,
        visibility .35s ease;
}

/* =======================================================
   PHONE: View Again card width matches the Reader Read Again
   card (about a 10px inset inside the landing panel). The row
   is pulled out through the landing padding, clamp(20px,4vw,46px);
   the continue section keeps its own 10px padding as the inset.
======================================================= */
@media (max-width:560px){
    .slideshow-landing .slideshow-landing-media-row{
        margin-inline:calc(1px - clamp(20px,4vw,46px));
        width:calc(100% - 2px + 2 * clamp(20px,4vw,46px));
    }
}


/* =========================================================
   MOBILE LANDING ALIGNMENT (Slideshow) - phones only (<=700px)
   View Again card now spans exactly the library section's width
   (inset 20px, same as the Reader and Video landings). Replaces
   the old ~11px-inset pull-out; top/bottom 10px is unchanged.
   ========================================================= */
@media (max-width:700px){
    .slideshow-landing .slideshow-landing-media-row{
        margin-inline:0;
        width:100%;
    }
    .slideshow-landing .slideshow-landing-continue-section{
        padding-left:0;
        padding-right:0;
    }
    .slideshow-landing .slideshow-landing-hero h2{
        margin:0;
        font-size:clamp(25px,5vw,35px);
        line-height:1.05;
        -webkit-text-size-adjust:100%;
        text-size-adjust:100%;
    }
    .slideshow-landing .slideshow-landing-recent-subtitle{
        font-size:12px;
        font-weight:400;
        line-height:1.2;
        color:var(--muted);
        -webkit-text-size-adjust:100%;
        text-size-adjust:100%;
    }
}


/* MOBILE HERO SUBTITLE (Slideshow) - phones only (<=700px)
   Same size and spacing as the Video hero subtitle. */
@media (max-width:700px){
    .slideshow-landing .slideshow-landing-hero p{
        margin:4px 0 0;
        font-size:14px;
        line-height:1.2;
    }
}


/* =========================================================
   HERO LOGO STANDARD (Reader / Video / Slideshow)
   Same logo tile, gap and proportions in all three heroes; see the
   matching block at the end of style.css for the formulas. Here the
   <img> is the tile itself, so the 72% glyph size is produced with
   14% padding on each side.
   ========================================================= */
#slideshowLanding .slideshow-landing-hero{
    --hero-h2:clamp(30px,4vw,55px);
    --hero-icon:calc(var(--hero-h2) * 1.05 + 21px);
    gap:calc(var(--hero-h2) * .4);
}
#slideshowLanding .slideshow-landing-logo{
    display:block;
    box-sizing:border-box;
    width:var(--hero-icon);
    height:var(--hero-icon);
    flex:0 0 auto;
    padding:calc(var(--hero-icon) * .14);
    object-fit:contain;
    border-radius:calc(var(--hero-icon) * .31);
    background:color-mix(in srgb,var(--panel) 55%,transparent);
    box-shadow:none;
}
@media (max-width:700px){
    #slideshowLanding .slideshow-landing-hero{--hero-h2:clamp(25px,5vw,35px)}
    #slideshowLanding .slideshow-landing-logo{
        background:color-mix(in srgb,var(--panel) 75%,transparent);
    }
}
