html.lgc-open { overflow: hidden; }
dialog.lgc-dialog {
  --lgc-ink: #f5f4ed; --lgc-muted: #bdc7bc;
  box-sizing: border-box; position: fixed; inset: 0; margin: auto;
  width: min(1100px, calc(100% - 32px)); max-width: none;
  height: auto; max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid #526256; border-radius: 18px;
  background: #17271f; color: var(--lgc-ink); overflow: auto;
  box-shadow: 0 24px 100px #0008; font: 15px/1.45 system-ui, sans-serif;
}
.lgc-dialog::backdrop { background: #07120be6; }
.lgc-dialog *, .lgc-dialog *::before, .lgc-dialog *::after { box-sizing: border-box; }
.lgc-dialog [hidden] { display: none !important; }
.lgc-dialog button { font: inherit; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal; }
.lgc-dialog button:focus-visible { outline: 3px solid #f3cf7e; outline-offset: 3px; }
.lgc-dialog .lgc-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; background: transparent; }
.lgc-dialog .lgc-eyebrow { color: #cad4b6; font-size: 10px; letter-spacing: .18em; margin: 0 0 4px; }
.lgc-dialog h2 { margin: 0; padding: 0; color: var(--lgc-ink); font-size: 21px; line-height: 1.2; }
.lgc-dialog .lgc-close { width: 44px; height: 44px; padding: 0; flex-shrink: 0; border: 1px solid #758676; border-radius: 50%; background: #253c2e; color: white; font-size: 30px; }
.lgc-dialog .lgc-viewer { position: relative; background: #0c140f; }
.lgc-dialog .lgc-stage { width: 100%; height: clamp(180px, calc(100dvh - 280px), 600px); display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; padding: 0; margin: 0; color: white; background: #0c140f; touch-action: pan-y; }
.lgc-dialog .lgc-stage:disabled { cursor: default; opacity: 1; }
.lgc-dialog .lgc-photo { width: 100%; height: 100%; max-height: none; max-width: 100%; object-fit: contain; border: 0; border-radius: 0; user-select: none; }
.lgc-dialog .lgc-message { padding: 24px 60px; max-width: 600px; }
.lgc-dialog .lgc-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 56px; margin: 0; padding: 0; border: 1px solid #ffffff66; border-radius: 12px; background: #0c140fd9; color: white; font-size: 40px; line-height: 1; }
.lgc-dialog .lgc-previous { left: 14px; } .lgc-dialog .lgc-next { right: 14px; }
.lgc-dialog .lgc-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; }
.lgc-dialog .lgc-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lgc-dialog .lgc-counter { color: #e3d6a8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lgc-dialog .lgc-caption { color: var(--lgc-ink); margin: 0; font-size: 14px; }
.lgc-dialog .lgc-toggle { flex-shrink: 0; border: 1px solid #7e936d; border-radius: 30px; min-height: 44px; padding: 8px 18px; background: #d3dfb9; color: #18271e; }
.lgc-dialog .lgc-thumbs { display: flex; gap: 10px; padding: 3px 22px 8px; overflow-x: auto; }
.lgc-dialog .lgc-thumb { width: 76px; height: 56px; flex: 0 0 76px; margin: 0; padding: 3px; border: 2px solid transparent; border-radius: 9px; background: #35483c; }
.lgc-dialog .lgc-thumb[aria-current="true"] { border-color: #f3cf7e; }
.lgc-dialog .lgc-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.lgc-dialog .lgc-hint { margin: 0; padding: 8px 22px 16px; color: var(--lgc-muted); font-size: 12px; }
@media(max-width:600px) {
  dialog.lgc-dialog { width: 100%; max-height: 100dvh; border-radius: 0; border: 0; }
  .lgc-dialog .lgc-header { padding: 12px 16px; }
  .lgc-dialog .lgc-stage { height: 49dvh; min-height: 200px; }
  .lgc-dialog .lgc-footer { padding: 12px 16px; gap: 10px; }
  .lgc-dialog .lgc-info { display: block; }
  .lgc-dialog .lgc-caption { font-size: 12px; margin-top: 3px; }
  .lgc-dialog .lgc-thumbs { padding-left: 16px; padding-right: 16px; }
  .lgc-dialog .lgc-hint { padding-left: 16px; padding-right: 16px; }
  .lgc-dialog .lgc-arrow { width: 42px; height: 48px; }
  .lgc-dialog .lgc-previous { left: 8px; } .lgc-dialog .lgc-next { right: 8px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .lgc-dialog .lgc-stage { height: 45dvh; min-height: 130px; }
}
