.lf-app-gallery {
  --gallery-ink: var(--apps-ink, var(--app-detail-ink, #173244));
  --gallery-muted: var(--apps-muted, var(--app-detail-muted, #526b7b));
  --gallery-paper: var(--apps-paper, var(--app-detail-panel, #ffffff));
  --gallery-tint: var(--apps-tint, var(--app-detail-soft, #edf4f7));
  --gallery-line: var(--apps-line, var(--app-detail-line, #d5e2e9));
  --gallery-accent: var(--apps-accent, var(--app-detail-accent, #05798c));
  color: var(--gallery-ink);
  min-width: 0;
  width: 100%;
  margin: 0;
  align-self: start;
  font-family: inherit;
}
.lf-app-gallery-showcase { max-width: 1100px; margin-inline: auto; }
.lf-app-gallery[data-tone=light] { --gallery-ink:#173244; --gallery-muted:#526b7b; --gallery-paper:#fff; --gallery-tint:#edf4f7; --gallery-line:#d5e2e9; --gallery-accent:#05798c; }
.lf-app-gallery[data-tone=dark] { --gallery-ink:#eff9ff; --gallery-muted:#abc2d2; --gallery-paper:#0e2030; --gallery-tint:#142c3f; --gallery-line:#2d485b; --gallery-accent:#7ce4ec; }
.lf-app-gallery *, .lf-app-gallery-dialog * { box-sizing: border-box; }
.lf-app-gallery :is(button, img), .lf-app-gallery-dialog :is(button, img) { -webkit-tap-highlight-color: transparent; }
.lf-app-gallery button, .lf-app-gallery-dialog button { font: inherit; cursor: pointer; }
.lf-app-gallery :is(button, [tabindex]):focus-visible { outline: 3px solid var(--gallery-accent); outline-offset: 3px; }
.lf-app-gallery-frame { border: 1px solid var(--gallery-line); border-radius: 18px; overflow: hidden; background: var(--gallery-paper); box-shadow: 0 18px 48px -32px #061e3b55; }
.lf-app-gallery-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 45px; padding: 9px 17px; border-bottom: 1px solid var(--gallery-line); }
.lf-app-gallery-topline > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--gallery-ink); font-size: 11px; line-height: 1.5; font-weight: 650; }
.lf-app-gallery-topline svg { flex: none; color: var(--gallery-accent); }
.lf-app-gallery-shot-label { color: var(--gallery-muted); font-size: 10px; text-align: right; line-height: 1.5; }
.lf-app-gallery .lf-app-gallery-stage { display: grid; place-items: center; position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 10; margin: 0; padding: clamp(8px, 1.2vw, 17px); border: 0; border-radius: 0; background: var(--gallery-tint); color: var(--gallery-ink); overflow: hidden; cursor: zoom-in; }
.lf-app-gallery-stage > picture { display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.lf-app-gallery-stage > img, .lf-app-gallery-stage > picture > img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; border-radius: 7px; box-shadow: 0 4px 17px #061b2b18; }
.lf-app-gallery-enlarge { position: absolute; right: 23px; bottom: 23px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #476076; border-radius: 8px; background: #0b2539; color: #fff; font-size: 11px; font-weight: 650; box-shadow: 0 3px 12px #03152440; transition: background .15s; pointer-events: none; }
.lf-app-gallery-stage:hover .lf-app-gallery-enlarge { background: #16445a; }
.lf-app-gallery-current { display: block; padding: 16px 18px; border-top: 1px solid var(--gallery-line); }
.lf-app-gallery-current > div:first-child { min-width: 0; }
.lf-app-gallery-current strong { display: block; font-size: 14px; font-weight: 650; line-height: 1.45; letter-spacing: -.015em; }
.lf-app-gallery-current p { margin: 5px 0 0; color: var(--gallery-muted); font-size: 12px; line-height: 1.7; }
.lf-app-gallery-caption { margin: 8px 3px 0; color: var(--gallery-muted); font-size: 10px; line-height: 1.7; }
.lf-app-gallery-unavailable { display: grid; place-items: center; align-content: center; gap: 12px; width: 100%; height: 100%; min-height: 130px; color: var(--gallery-muted); background: var(--gallery-tint); font-size: 12px; }
.lf-app-gallery-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lf-app-gallery-card .lf-app-gallery-topline { padding: 9px 12px; }
.lf-app-gallery-card .lf-app-gallery-shot-label { display: none; }
.lf-app-gallery-card .lf-app-gallery-stage { aspect-ratio: 16 / 11; }
.lf-app-gallery-card .lf-app-gallery-current { padding: 14px; }
.lf-app-gallery-card .lf-app-gallery-current strong { font-size: 13px; }
.lf-app-gallery-card .lf-app-gallery-current p { font-size: 11px; }
.lf-app-gallery-overlay { z-index: 10020 !important; background: #020c17d9 !important; backdrop-filter: blur(5px); }
.lf-app-gallery-dialog {
  --gallery-ink: #edf8ff; --gallery-muted: #afc5d5; --gallery-paper: #0e2233; --gallery-tint: #142e42; --gallery-line: #355064; --gallery-accent: #7ae0ea;
  z-index: 10021 !important; display: grid !important; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0 !important;
  width: min(96vw, 1560px) !important; max-width: min(96vw, 1560px) !important; height: min(92dvh, 1100px); max-height: 94dvh;
  padding: 0 !important; border: 1px solid var(--gallery-line) !important; border-radius: 18px !important; background: #081723 !important; color: var(--gallery-ink) !important; overflow: hidden;
}
.lf-app-gallery-dialog :is(button, [tabindex]):focus-visible { outline: 3px solid var(--gallery-accent); outline-offset: -3px; }
.lf-app-gallery-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--gallery-line); }
.lf-app-gallery-dialog-heading > div:first-child { min-width: 0; }
.lf-app-gallery-dialog-heading > div:first-child > span { display: block; margin-bottom: 5px; color: var(--gallery-muted); font-size: 11px; font-weight: 550; }
.lf-app-gallery-dialog-heading h2 { margin: 0; color: var(--gallery-ink); font-size: 17px; font-weight: 650; line-height: 1.4; letter-spacing: -.02em; }
.lf-app-gallery-dialog-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lf-app-gallery-dialog-actions > button { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px; color: var(--gallery-ink); border: 1px solid var(--gallery-line); border-radius: 8px; background: var(--gallery-paper); font-size: 12px; }
.lf-app-gallery-dialog-actions > button:hover { background: var(--gallery-tint); border-color: var(--gallery-accent); }
.lf-app-gallery-dialog-actions > .lf-app-gallery-close { width: 44px; padding: 0; }
.lf-app-gallery-full { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; background: #06101a; }
.lf-app-gallery-full > img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lf-app-gallery-full[data-zoomed=true] { display: block; }
.lf-app-gallery-full[data-zoomed=true] > img { width: auto; height: auto; max-width: none; max-height: none; margin: 0 auto; }
.lf-app-gallery-dialog-footer { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,360px); align-items: center; gap: 25px; padding: 15px 22px; border-top: 1px solid var(--gallery-line); background: var(--gallery-paper); }
.lf-app-gallery-dialog-footer > div:first-child { min-width: 0; }
.lf-app-gallery-dialog-footer > div:first-child > p:first-child { margin: 0; color: var(--gallery-ink); font-size: 13px; line-height: 1.7; }
.lf-app-gallery-dialog-footer > div:first-child > p + p { margin: 5px 0 0; color: var(--gallery-muted); font-size: 10px; line-height: 1.6; }
@media (max-width: 650px) {
  .lf-app-gallery-frame { border-radius: 13px; }
  .lf-app-gallery-topline { padding: 9px 12px; gap: 8px; }
  .lf-app-gallery-topline > span:first-child { font-size: 10px; }
  .lf-app-gallery-shot-label { font-size: 9px; max-width: 95px; }
  .lf-app-gallery .lf-app-gallery-stage { padding: 8px; aspect-ratio: 4 / 3; }
  .lf-app-gallery-enlarge { right: 15px; bottom: 15px; padding: 8px; font-size: 10px; }
  .lf-app-gallery-current, .lf-app-gallery-card .lf-app-gallery-current { padding: 13px; }
  .lf-app-gallery-current strong { font-size: 13px; }
  .lf-app-gallery-current p { font-size: 11px; }
  .lf-app-gallery-dialog { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; height: 94dvh; border-radius: 12px !important; }
  .lf-app-gallery-dialog-heading { align-items: start; padding: 12px; gap: 12px; }
  .lf-app-gallery-dialog-heading h2 { font-size: 14px; }
  .lf-app-gallery-dialog-heading > div:first-child > span { font-size: 10px; }
  .lf-app-gallery-dialog-actions { gap: 6px; }
  .lf-app-gallery-dialog-actions > button { padding: 8px; font-size: 10px; }
  .lf-app-gallery-dialog-actions > button > svg { width: 14px; height: 14px; }
  .lf-app-gallery-dialog-actions > .lf-app-gallery-close { width: 44px; }
  .lf-app-gallery-full { padding: 8px; }
  .lf-app-gallery-dialog-footer { grid-template-columns: minmax(0,1fr); align-items: stretch; gap: 12px; padding: 12px; }
  .lf-app-gallery-dialog-footer > div:first-child > p:first-child { font-size: 12px; }
}
@media (max-width: 380px) {
  .lf-app-gallery-dialog-actions > button:not(.lf-app-gallery-close) > span { display: none; }
  .lf-app-gallery-dialog-actions > button:not(.lf-app-gallery-close) { width: 44px; }
  .lf-app-gallery-enlarge > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lf-app-gallery *, .lf-app-gallery-dialog * { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) {
  .lf-app-gallery-frame, .lf-app-gallery :is(button, .lf-app-gallery-current, .lf-app-gallery-topline), .lf-app-gallery-dialog, .lf-app-gallery-dialog button { border-color: CanvasText !important; }
  .lf-app-gallery-enlarge { forced-color-adjust: none; background: Canvas; color: CanvasText; border-color: CanvasText; }
}

/* Named screen selection scales to the app's actual captured views without fetching hidden thumbnails. */
.lf-app-gallery-picker { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,1.4fr); align-items: center; gap: 6px 16px; min-width: 0; margin-top: 14px; color: var(--gallery-ink); overflow-wrap: anywhere; }
.lf-app-gallery-picker > span:first-child { font-size: 12px; font-weight: 700; }
.lf-app-gallery-picker select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--gallery-line); border-radius: 9px; background: var(--gallery-paper); color: var(--gallery-ink); text-overflow: ellipsis; font: inherit; font-size: 16px; cursor: pointer; }
.lf-app-gallery-dialog .lf-app-gallery-picker { grid-template-columns: minmax(0,1fr); gap: 5px; margin: 0; }
.lf-app-gallery-dialog .lf-app-gallery-picker > span:last-child { font-size: 10px; }
.lf-app-gallery-picker select:focus-visible { outline: 3px solid var(--gallery-accent); outline-offset: 3px; }
.lf-app-gallery-picker > span:last-child { grid-column: 1 / -1; color: var(--gallery-muted); font-size: 11px; line-height: 1.6; }
@media (max-width: 640px) {
  .lf-app-gallery-picker { grid-template-columns: minmax(0,1fr); gap: 7px; }
}
