/* Digital signage screens (module `signage`). Scoped under .signage so nothing else changes. */
.signage .sg-screens { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.signage .sg-screen .card__head { flex-wrap: wrap; gap: 0.5rem; }
.signage .sg-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.signage .sg-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.signage .sg-file { width: 100%; max-width: 100%; min-width: 0; }
.signage .field, .signage .grid > *, .signage .card__body, .signage .empty { min-width: 0; max-width: 100%; }
.signage .empty__body { overflow-wrap: anywhere; }
.signage .sg-assets, .signage .list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.signage .sg-asset, .signage .sg-playlist { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; min-width: 0; }
.signage .sg-asset img { width: 5.5rem; height: 3.1rem; object-fit: cover; border-radius: 0.4rem; border: 1px solid var(--line); background: var(--soft); }
.signage .sg-asset > div, .signage .sg-playlist > div:first-child { display: grid; min-width: 0; flex: 1 1 10rem; overflow-wrap: anywhere; }
.signage .card, .signage .callout { min-width: 0; }
.signage .kv dd { overflow-wrap: anywhere; }
.sg-editor .sg-slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.sg-slide-row { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.75rem; display: grid; gap: 0.6rem; min-width: 0; }
.sg-slide-row__head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.sg-slide-row__tools, .sg-add { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sg-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.sg-code { font-size: 1.4rem; letter-spacing: 0.15em; text-transform: uppercase; text-align: center; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; }

/* Preview: the player's fixed templates, scaled by container width (cqw). */
.sg-preview { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.sg-frame { margin: 0; display: grid; gap: 0.35rem; min-width: 0; }
.sg-frame > .sg-slide { container-type: inline-size; }
.sg-frame figcaption { font-size: 0.8rem; color: var(--muted); }
.sg-slide { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line-2); border-radius: 0.5rem; display: flex; flex-direction: column;
  justify-content: center; padding: 6cqw 7cqw; gap: 2cqw; font-size: 4cqw; container-type: size; }
.sg-portrait .sg-slide { aspect-ratio: 9 / 16; max-width: 14rem; }
.sg-light { background: #fbf8f2; color: #1d232a; }
.sg-dark { background: #131a22; color: #f4f6f8; }
.sg-slide .sg-title { margin: 0; font-size: 9cqmin; font-weight: 750; line-height: 1.05; overflow-wrap: anywhere; }
.sg-slide .sg-body { margin: 0; font-size: 4.6cqmin; line-height: 1.3; overflow-wrap: anywhere; }
.sg-slide .sg-footer { margin: 0; font-size: 3.6cqmin; font-weight: 650; background: currentColor; padding: 1cqmin 3cqmin; border-radius: 6cqmin; align-self: flex-start; }
.sg-slide .sg-footer { color: inherit; background: none; border: 0.5cqmin solid currentColor; }
.sg-tpl-headline { align-items: center; text-align: center; }
.sg-tpl-notice { border: 2cqmin solid currentColor; }
.sg-slide--image { padding: 0; background: #000; }
.sg-slide--image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sg-slide--image.sg-fit-contain img { object-fit: contain; }
.sg-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2cqmin 4cqmin; font-size: 4cqmin; background: rgb(0 0 0 / 62%); color: #fff; }
.sg-qr { position: absolute; right: 3cqmin; bottom: 3cqmin; width: 22cqmin; aspect-ratio: 1; background: #fff; color: #111; border: 1px dashed #666; display: grid; place-items: center; text-align: center; font-weight: 700; }
.sg-qr small { font-size: 2.4cqmin; font-weight: 600; }
@media (max-width: 480px) { .signage .page-head { align-items: stretch; } }
