/* Aesthetic stills: the stills window (ui/stills.js), Make's carousel Slides panel, the Creators strip's Add a photo. */
.stills-search { flex-wrap: nowrap; }
.stills-search input { flex: 1; min-width: 0; }
.stills-chips { flex-wrap: wrap; }
.still-tile { display: block; }
.still-tile .still-pick { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: #2B2925; cursor: pointer; }
.still-tile[aria-current="true"] { outline: 3px solid var(--accent); outline-offset: -3px; }
.still-tile .cap { pointer-events: none; font-size: 12px; }
.still-tile .cap a { pointer-events: auto; color: #fff; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.still-tile .cap a:hover { text-decoration: underline; }
.still-tile .still-hide { position: absolute; top: 6px; right: 6px; z-index: 3; min-height: 28px; padding: 0 8px; font-size: 12px; background: rgba(0,0,0,.55); color: #fff; border-color: transparent; opacity: 0; transition: opacity .15s; }
.still-tile:hover .still-hide, .still-tile .still-hide:focus-visible { opacity: 1; }
@media (hover: none) { .still-tile .still-hide { opacity: 1; } }
.stills-credit { color: inherit; font-weight: 600; }
.still-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Make > Carousel > Slides */
.slide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; } /* minmax(0): one-line labels never widen the column */
.slide-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; border-radius: 10px; min-width: 0; }
.slide-row .slide-go { min-width: 0; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.slide-row .slide-go:hover { background: rgba(0,0,0,.04); }
.slide-row[aria-current="true"] .slide-go { border-color: var(--ink); background: var(--panel); }
.slide-row .n { flex: none; min-width: 24px; height: 24px; border-radius: 999px; background: rgba(0,0,0,.08); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; }
.slide-row .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.slide-row img { flex: none; width: 36px; height: 48px; object-fit: cover; border-radius: 6px; }
.slide-row.still { background: rgba(0,0,0,.025); padding-bottom: 8px; }
/* the cover and the last line carry an x (Make: turns the cover off, clears the last line); 40 px target */
.slide-row.has-x { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px; }
.slide-row .slide-x { min-width: 40px; min-height: 40px; padding: 0; font-size: 20px; line-height: 1; }
.slide-still { gap: 8px; padding: 0 8px 0 42px; }
.slide-still input[type="text"], .slide-still select { width: 100%; min-width: 0; }
.slide-add { display: flex; justify-content: center; }
.slide-add .btn { min-height: 24px; font-size: 12px; padding: 0 12px; border: 1px dashed #B9B1A4; border-radius: 999px; color: var(--muted); }
.slide-add .btn:hover, .slide-add .btn:focus-visible { border-color: var(--ink); color: var(--ink); }

/* Creators editor: Add a photo between thumbnails, the words' place on a photo */
.inf-insert { display: flex; justify-content: center; }
.inf-insert .btn { min-height: 24px; font-size: 12px; padding: 0 10px; border: 1px dashed #B9B1A4; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.inf-insert .btn:hover, .inf-insert .btn:focus-visible { border-color: var(--ink); color: var(--ink); }
.inf-pos { flex-wrap: wrap; gap: 8px; }

@media (max-width: 720px) {
  .slide-still { padding-left: 8px; }
}

/* Make > Our photos (ui/own-photos.js): a mode of the stills window. The upload block, album tiles (.catsq), the photos
   with Move / Delete, selecting several, and the small album and confirm dialogs. */
.own-up { display: grid; gap: 10px; }
.own-fold > summary { cursor: pointer; padding: 6px 0; font-size: 14px; font-weight: 600; }
.own-fold[open] > summary { margin-bottom: 10px; }
.own-album { flex-wrap: wrap; gap: 8px 10px; }
.own-album input[type="text"] { flex: 1 1 180px; min-width: 0; max-width: 320px; }
.own-drop { padding: 18px 16px; }
.own-hold { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #FBF3E2; border: 1px solid #EBD7AA; }
.own-hold[hidden], .own-progress:empty { display: none; }
.own-progress { margin: 0; }
.own-bar { flex-wrap: wrap; gap: 8px; }
.own-selcount { font-weight: 600; }
.stills-dlg .btn.danger { color: var(--bad); }
.own-tile .own-acts { position: absolute; top: 6px; right: 6px; z-index: 3; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.own-tile:hover .own-acts, .own-tile:focus-within .own-acts { opacity: 1; }
@media (hover: none) { .own-tile .own-acts { opacity: 1; } }
.own-tile .own-acts .btn { min-height: 28px; padding: 0 8px; font-size: 12px; background: rgba(0,0,0,.55); color: #fff; border-color: transparent; }
.own-tile.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.own-tile.sel .still-pick::after { content: ''; position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.own-cap { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.own-ask { width: min(420px, calc(100vw - 32px)); }
dialog.own-ask select, dialog.own-ask input { width: 100%; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .own-tile .own-acts { transition: none; } }

/* The stills window on phones (<= 768 px; desktop unchanged). The 32 category chips are ONE sideways row (proximity
   snap, touch-action auto so a vertical swipe still scrolls, edge to edge so the cut-off chip says "more"); the mode
   switch and the search stay compact at the top; the photos get the rest of the height, in square tiles so two full
   rows fit even at 320 x 568. Our photos: the albums come first, the upload block under them. */
.stills-dlg .seg .seg-short { display: none; } /* "Our stills" without the count: phones only (below) */
@media (max-width: 768px) {
  dialog.big.stills-dlg { width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .stills-dlg .dlg > header { padding: 8px 16px; gap: 8px; }
  .stills-dlg .dlg > header > .row { flex-wrap: nowrap; min-width: 0; }
  .stills-dlg .dlg > header h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stills-dlg .dlg-tools { gap: 8px; padding: 10px 16px 0; }
  .stills-dlg .dlg-body { gap: 12px; padding: 12px 16px 16px; }
  .stills-dlg .dlg > footer { gap: 0 12px; padding: 6px 16px; }
  .stills-dlg .dlg > footer .small { font-size: 12px; }
  .stills-dlg .dlg > footer > .small:first-child { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* one line, the count under it */
  .stills-dlg .stills-credit { display: inline-flex; align-items: center; min-height: 24px; }
  .stills-dlg input[type=search], .stills-dlg input[type=text] { font-size: 16px; } /* 16 px: Safari does not zoom in */
  .stills-dlg .seg { display: flex; width: 100%; box-sizing: border-box; }
  .stills-dlg .seg button { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: 14px; white-space: nowrap; }
  .stills-dlg .seg .seg-long { display: none; } .stills-dlg .seg .seg-short { display: inline; } /* the footer has the count */
  .stills-dlg .stills-chips { flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline: 16px; overscroll-behavior-x: contain; touch-action: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px; }
  .stills-dlg .stills-chips::-webkit-scrollbar { display: none; }
  .stills-dlg .stills-chips:empty { display: none; }
  .stills-dlg .stills-chips > .chip { flex: none; white-space: nowrap; scroll-snap-align: start; }
  .stills-dlg .bggrid.photos .bgtile { aspect-ratio: 1; }
  .stills-dlg .still-tile .cap a { display: inline-flex; align-items: center; min-height: 24px; }
  .stills-dlg .dlg-body > .own-up + .catgrid { order: -1; }
}
