/* Scoped gallery presentation. Revision 2026-11-04. */
#gallery { --gallery-ink: #243044; --gallery-muted: #617087; --gallery-line: #dde4ef; background: #f2f5fa; }
#gallery button, #gallery input { font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; }
#gallery button { -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }
#gallery .gallery-lead { text-align: center; max-width: 760px; line-height: 1.7; }
#gallery .gallery-controls { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin: 24px 0 18px; }
#gallery .filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
#gallery .filter-label { font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #617087; margin-right: 4px; }
#gallery .filter-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 14px; border: 1px solid #dce3ee; border-radius: 18px; color: #49576d; background: #fff; font-size: 13px; font-weight: 700; line-height: 1.25; cursor: pointer; }
#gallery .filter-pill.active { background: #3d5a96; border-color: #3d5a96; color: #fff; box-shadow: 0 4px 10px -5px #3d5a96; }
#gallery .gallery-count { margin-left: auto; font-size: 12px; color: #617087; white-space: nowrap; }
#gallery .clips-panel { display: grid; grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); gap: 0; border-radius: 24px; border: 1px solid #e0e6f0; background: #fff; overflow: hidden; box-shadow: 0 28px 54px -30px rgba(32,51,91,.38), 0 3px 10px rgba(32,51,91,.05); }
#gallery .clips-rail { min-width: 0; padding: 22px 0 14px; background: linear-gradient(#f8fafe, #f0f4fa); border-right: 1px solid #e1e7f0; }
#gallery .clips-label { padding: 0 22px 12px; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 700; color: #64748b; }
#gallery #clipList { max-height: 570px; overflow-y: auto; padding: 0 10px 6px; gap: 4px; }
#gallery .clip-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 59px; padding: 10px 14px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: #243044; cursor: pointer; }
#gallery .clip-btn.active { background: #fff; box-shadow: 0 6px 16px -9px rgba(32,51,91,.35), 0 1px 3px rgba(32,51,91,.08); }
#gallery .clip-btn.active::before { left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: #3d5a96; }
#gallery .clip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#gallery .clip-title { font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; font-size: 15px; font-weight: 800; line-height: 1.25; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#gallery .clip-meta { font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; color: #6b7890; }
#gallery .clip-dur { flex: 0 0 auto; min-width: 38px; margin: 0; color: #6b7890; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#gallery .clips-stage { padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
#gallery .clips-screen { position: relative; width: 100%; height: 0; padding-top: 56.25%; aspect-ratio: auto; overflow: hidden; border-radius: 16px; background: #f7f9fc; box-shadow: inset 0 0 0 1px #e5eaf2; }
#gallery .clips-screen video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; border-radius: 0; background: #fff; object-fit: contain; }
#gallery .player-empty { position: absolute; inset: 0; margin: 0; display: flex; justify-content: center; align-items: center; padding: 24px; color: #64748b; text-align: center; font-size: 14px; }
#gallery [hidden] { display: none !important; }
#gallery .clips-controls { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#gallery .clip-restart { min-height: 36px; padding: 8px 14px; font-size: 13px; line-height: 1.25; border: 1px solid #dde4ef; border-radius: 18px; background: #fff; color: #475569; }
#gallery .playback-note { font-size: 12px; color: #64748b; margin-left: 3px; }
#gallery .clips-pills { display: flex; gap: 2px; margin-left: auto; padding: 3px; border: 0; border-radius: 18px; background: #edf1f7; }
#gallery .clips-pills .clips-pill { min-height: 30px; padding: 6px 14px; border: 0; border-radius: 15px; font-size: 12px; line-height: 1.4; }
#gallery .clips-pills .clips-pill.active { color: #3d5a96; background: #fff; box-shadow: 0 1px 4px rgba(32,51,91,.16); }
#gallery button:disabled { opacity: .38; cursor: not-allowed; transform: none; }
#gallery .seek-row { display: flex; align-items: center; gap: 12px; }
#gallery .seek-row input { flex: 1; min-width: 0; accent-color: #3d5a96; cursor: pointer; }
#gallery .seek-time { font-size: 12px; font-variant-numeric: tabular-nums; color: #617087; white-space: nowrap; }
#gallery .clips-caption { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; color: #475569; font-size: 13px; line-height: 1.5; }
#gallery .cap-robot { font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; font-size: 15px; font-weight: 800; }
#gallery .cap-success { margin-left: auto; font-size: 13px; color: #3d5a96; white-space: nowrap; }
#gallery .clip-context { min-height: 2.8em; margin: 0; font-size: 12px; line-height: 1.5; color: #66768d; }
#gallery .gallery-footer { margin-top: 18px; color: #64748b; font-size: 12px; line-height: 1.6; }
#gallery button:focus-visible, #gallery input:focus-visible { outline: 3px solid #8da9d5; outline-offset: 3px; }
@media (max-width: 900px) {
  #gallery .clips-panel { grid-template-columns: 1fr; }
  #gallery .clips-rail { border-right: 0; border-bottom: 1px solid #e1e7f0; padding-top: 16px; }
  #gallery #clipList { max-height: 220px; }
  #gallery .clips-stage { padding: 14px; }
}
@media (max-width: 480px) {
  #gallery .filter-pill { min-height: 34px; padding: 7px 11px; }
  #gallery .gallery-count { margin-left: 0; }
  #gallery .cap-success { margin-left: 0; }
  #gallery .playback-note { flex-basis: 100%; order: 4; }
  #gallery .clip-context { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { #gallery button { transition: none; transform: none; } }
