/* The Gallery page (pages/gallery.js). Every card the same size, every
 * button in a set the same size (George: "everything uniform and perfect"). */
.stp-gallery-mark { margin-top: -10px; }
.stp-gallery-tabs .st-chip { display: inline-flex; align-items: center; gap: 8px; }
.stp-gallery-n { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12px; font-weight: 800; }
.stp-gallery-tabs .st-chip.on .stp-gallery-n { background: rgba(0, 0, 0, .14); }

.stp-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stp-gallery-card { display: grid; grid-template-rows: auto auto 1fr; min-width: 0; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.stp-gallery-card:hover { border-color: #3a4866; transform: translateY(-2px); }
.stp-gallery-shot { position: relative; aspect-ratio: 16 / 9; background: #05080f; }
.stp-gallery-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stp-gallery-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 0; min-width: 0; }
.stp-gallery-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.stp-gallery-body .st-pill { flex: 0 0 auto; white-space: nowrap; }
.stp-gallery-using { background: rgba(46, 212, 122, .14); color: var(--green); font-weight: 700; }
.stp-gallery-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; align-content: end; }
.stp-gallery-acts .st-btn { width: 100%; min-height: 48px; padding: 0 10px; font-size: 14px; line-height: 1.2; text-align: center; }

.stp-gallery-empty { display: grid; justify-items: center; gap: 14px; padding: 48px 20px; text-align: center; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.stp-gallery-empty p { margin: 0; max-width: 46ch; color: var(--muted); }
.stp-gallery-empty-pic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(46, 212, 122, .12); color: var(--green); }
.stp-gallery-empty-pic svg { width: 34px; height: 34px; }

/* The windows. */
.stp-gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stp-gallery-pair .st-btn, .stp-gallery-one .st-btn { width: 100%; min-height: 52px; }
.stp-gallery-one { display: grid; }
.stp-gallery-confirm { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; }
.stp-gallery-confirm img, .stp-gallery-what img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 10px; background: #05080f; display: block; }
.stp-gallery-confirm p { margin: 0; }
.stp-gallery-what { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.stp-gallery-what > div { display: grid; gap: 4px; min-width: 0; }
.stp-gallery-what b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stp-gallery-strips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stp-gallery-strip { flex: none; width: 100%; align-content: start; border: 2px solid var(--line); }
.stp-gallery-strip:disabled { opacity: .5; cursor: not-allowed; }
.stp-gallery-strip:disabled:hover { border-color: var(--line); }
.stp-gallery-strip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stp-gallery-strip .st-muted { font-weight: 500; font-size: 13px; }
.stp-gallery-strip-pic { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #05080f; }
.stp-gallery-strip-pic img { width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto; }
.stp-gallery-strip-pic i { font-style: normal; font-size: 13px; }
.stp-gallery-strip-new { border-style: dashed; }
.stp-gallery-plus { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(46, 212, 122, .14); color: var(--green); font-size: 30px; font-weight: 400; }
.stp-gallery-done { display: grid; justify-items: center; gap: 8px; padding: 12px 0 4px; text-align: center; }
.stp-gallery-done > span { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--green-ink); font-size: 42px; animation: stp-gallery-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.stp-gallery-done b { font-size: 20px; }
@keyframes stp-gallery-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 640px) {
  .stp-gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .stp-gallery-strips { grid-template-columns: 1fr 1fr; }
  .stp-gallery-confirm, .stp-gallery-what { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .stp-gallery-card, .stp-gallery-done > span { transition: none; animation: none; } }
