.jmms-slideshow{max-width:100%;width:min(100%,960px);margin:2rem auto;border:1px solid var(--line,#41434a);border-radius:5px;overflow:hidden;background:#14171b}
.jmms-slideshow-stage{position:relative;max-width:100%;}
.jmms-slideshow .jmms-slide{margin:0;}
.jmms-slideshow .jmms-slide[hidden]{display:none!important}
.jmms-slideshow img{display:block;width:100%;height:auto;max-height:65vh;min-height:160px;object-fit:contain;margin:0 auto;background:#101217}
.jmms-slideshow figcaption{font-size:.9rem;text-align:center;padding:.5rem .75rem;color:#e2e4e9}
.jmms-slideshow figcaption:empty{display:none}
.jmms-slideshow-controls{display:flex;align-items:center;justify-content:center;gap:1rem;padding:.35rem .75rem;background:#25282e;color:#fff}
.jmms-slideshow-controls button{min-width:44px;min-height:44px;background:transparent;color:inherit;border:1px solid #565a64;border-radius:4px;cursor:pointer;font-size:1.35rem}
.gallery-admin-list{display:flex;flex-wrap:wrap;gap:.65rem;margin:1rem 0 2rem}
.gallery-admin-list a{border:1px solid #777;padding:.5rem .8rem;border-radius:4px}
.gallery-photo-row{display:flex;gap:.5rem;align-items:center;margin:.5rem 0;border:1px solid #555;padding:.4rem;flex-wrap:wrap}
.gallery-photo-row img{width:95px;height:65px;object-fit:contain}
.gallery-photo-row input[name="gallery_caption[]"]{flex:1 1 160px;min-width:0}
.gallery-photo-row button{min-width:38px;min-height:38px}
.gallery-add{display:flex;align-items:end;gap:1rem;flex-wrap:wrap;margin:1.2rem 0}
.gallery-add label{flex:1 1 230px}.gallery-add select{max-width:100%}
.gallery-delete{margin:1rem 0}.gallery-shortcode{user-select:all}
.gallery-insert-controls{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;padding:.5rem 0}
.gallery-insert-controls select{max-width:250px}
@media(max-width:500px){.jmms-slideshow img{min-height:120px;max-height:45vh}.jmms-slideshow-controls{gap:.4rem}.gallery-photo-row img{width:68px}}

/* v18.8 visual, paginated picker. Only 24 thumbnail elements exist at once. */
.gallery-picker{border:1px solid var(--line,#555);border-radius:6px;padding:1rem;margin:1rem 0;min-width:0}
.gallery-picker h3{margin-top:0}
.gallery-browser-toolbar{display:flex;flex-wrap:wrap;gap:.8rem;align-items:end;justify-content:space-between;margin:1rem 0}
.gallery-browser-toolbar label{flex:1 1 220px;min-width:0}
.gallery-browser-toolbar input[type=search]{display:block;width:100%;min-width:0}
.gallery-browser-toolbar button{min-height:42px}
.gallery-browser-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.7rem}
.gallery-browser-tile{display:flex;flex-direction:column;gap:.35rem;min-width:0;padding:.45rem;border:2px solid var(--line,#555);border-radius:5px;cursor:pointer;background:rgba(120,120,120,.06)}
.gallery-browser-tile:focus-within{outline:2px solid currentColor;outline-offset:2px}
.gallery-browser-tile.is-selected{border-color:#67a7cc;background:rgba(103,167,204,.15)}
.gallery-browser-tile.is-added{opacity:.55;cursor:default}
.gallery-browser-tile img{width:100%;height:112px;object-fit:contain;background:rgba(0,0,0,.15);margin:0}
.gallery-browser-name{font-size:.8rem;overflow-wrap:anywhere;line-height:1.25;min-height:2.3em}
.gallery-browser-check{display:flex;gap:.3rem;align-items:center;margin-top:auto;font-size:.8rem}
.gallery-browser-check input{width:18px;height:18px;flex:none}
.gallery-browser-pages{display:flex;align-items:center;justify-content:center;gap:.45rem;flex-wrap:wrap;margin-top:1rem}
.gallery-browser-pages button{min-height:40px;min-width:42px}
.gallery-browser-pages button:disabled{opacity:.4;cursor:default}
@media(max-width:450px){.gallery-browser-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-picker{padding:.6rem}}

/* v18.9: editing link is outside the selection label, so clicking it never checks the box. */
.gallery-browser-choice{display:flex;flex-direction:column;gap:.35rem;cursor:pointer;flex:1;min-width:0}
.gallery-browser-edit{display:inline-flex;align-items:center;align-self:flex-start;font-size:.78rem;line-height:1.2;padding:.35rem .2rem;text-decoration:underline;text-underline-offset:2px}
.gallery-browser-tile.is-added .gallery-browser-edit{opacity:1}
.gallery-browser-edit:focus-visible{outline:2px solid currentColor;outline-offset:2px}
