/* Scoped gallery styling; the academy's shared theme remains untouched. */
body .public-page.gallery-page .page-hero { padding-top: 28px; padding-bottom: 30px; }
body .public-page.gallery-page .page-hero h1 { font-size: clamp(36px, 3.8vw, 48px); margin: 10px 0 12px; letter-spacing: -1.4px; }
body .public-page.gallery-page .page-hero p { margin: 0; font-size: 14px; line-height: 1.6; }
body .public-page.gallery-page > section.content { padding-top: 12px; }
body .ene-gallery {
  width: 100%;
  margin: 0;
  color: #183955;
  --gallery-red: #b92038;
  --gallery-ink: #183955;
  --gallery-line: #dce6ed;
}
body .ene-gallery [hidden], body .ene-gallery-lightbox [hidden] { display: none !important; }
body .ene-gallery-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 23px; }
body .ene-gallery-eyebrow { display: block; font-size: 10px; font-weight: 800; letter-spacing: 2px; color: #9b2639; }
body .ene-gallery-heading h2 { font-size: clamp(25px, 3vw, 36px); letter-spacing: -1px; line-height: 1.15; margin: 10px 0 0; }
body .ene-gallery-total { display: inline-block; flex-shrink: 0; background: #fff2cf; border: 1px solid #ead6a2; color: #725829; padding: 8px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
body .ene-gallery-figure { margin: 0; }
body .ene-gallery-stage { position: relative; height: clamp(300px, 58vh, 620px); overflow: hidden; isolation: isolate; border: 1px solid #e0dacf; border-radius: 23px; background: #eeebe5; box-shadow: 0 14px 38px #1839550a; touch-action: pan-y pinch-zoom; }
body .ene-gallery button, body .ene-gallery-lightbox button { font: 700 13px/1.4 'Trebuchet MS', system-ui, sans-serif; letter-spacing: 0; text-transform: none; margin: 0; min-width: 44px; min-height: 44px; cursor: pointer; color: #183955; border: 0; box-shadow: none; }
body .ene-gallery button:hover, body .ene-gallery-lightbox button:hover { transform: none; filter: none; }
body .ene-gallery button:active, body .ene-gallery-lightbox button:active { transform: none; }
body .ene-gallery button:focus-visible, body .ene-gallery-lightbox button:focus-visible { outline: 3px solid #d8a929; outline-offset: 4px; }
body .ene-gallery .ene-gallery-open { display: block; width: 100%; height: 100%; position: relative; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: hidden; cursor: zoom-in; }
body .ene-gallery .ene-gallery-open:focus-visible { outline-offset: -5px; }
body .ene-gallery .ene-gallery-image { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; opacity: 0; transition: opacity .22s ease; }
body .ene-gallery .ene-gallery-image.ene-gallery-image-ready { opacity: 1; }
body .ene-gallery .ene-gallery-expand { position: absolute; right: 17px; bottom: 17px; display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 11px; color: white; background: #183955d9; border: 1px solid #ffffff47; border-radius: 9px; font-size: 11px; font-weight: 700; backdrop-filter: blur(7px); pointer-events: none; }
body .ene-gallery .ene-gallery-expand svg { width: 16px; height: 16px; }
body .ene-gallery svg, body .ene-gallery-lightbox svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body .ene-gallery .ene-gallery-arrow, body .ene-gallery-lightbox .ene-gallery-arrow { display: grid; place-items: center; position: absolute; top: 50%; width: 48px; height: 48px; padding: 0; margin-top: -24px; border: 1px solid #ffffffa3; border-radius: 50%; background: #fffffff0; color: #183955; box-shadow: 0 4px 18px #18395524; transition: background .18s ease, box-shadow .18s ease; z-index: 2; }
body .ene-gallery .ene-gallery-arrow:hover, body .ene-gallery-lightbox .ene-gallery-arrow:hover { background: #ffda3d; box-shadow: 0 5px 20px #18395533; }
body .ene-gallery .ene-gallery-previous, body .ene-gallery-lightbox .ene-gallery-previous { left: 18px; }
body .ene-gallery .ene-gallery-next, body .ene-gallery-lightbox .ene-gallery-next { right: 18px; }
body .ene-gallery .ene-gallery-arrow svg, body .ene-gallery-lightbox .ene-gallery-arrow svg { width: 24px; height: 24px; }
body .ene-gallery-count { position: absolute; left: 17px; bottom: 17px; display: inline-block; padding: 7px 11px; border-radius: 9px; background: #183955d9; border: 1px solid #ffffff47; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1.3px; font-variant-numeric: tabular-nums; backdrop-filter: blur(7px); pointer-events: none; }
body .ene-gallery-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin: 0; padding: 15px 2px 19px; font-size: 13px; line-height: 1.5; color: #5e7181; }
body .ene-gallery-swipe-hint { display: none; font-size: 11px; }
body .ene-gallery-thumbnails { display: flex; position: relative; align-items: center; gap: 10px; padding: 5px 3px 13px; margin: 0 -3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b9c6d1 transparent; scroll-padding-inline: 3px; -webkit-overflow-scrolling: touch; }
body .ene-gallery-thumbnails::-webkit-scrollbar { height: 5px; }
body .ene-gallery-thumbnails::-webkit-scrollbar-thumb { background: #b9c6d1; border-radius: 9px; }
body .ene-gallery .ene-gallery-thumb { display: block; position: relative; flex: 0 0 104px; width: 104px; height: 76px; padding: 0; min-height: 76px; border: 3px solid transparent; border-radius: 11px; background: #eeeae3; overflow: hidden; opacity: .7; transition: opacity .18s, border-color .18s; }
body .ene-gallery .ene-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; pointer-events: none; }
body .ene-gallery .ene-gallery-thumb:hover { opacity: 1; box-shadow: none; }
body .ene-gallery .ene-gallery-thumb.is-selected { border-color: #b92038; opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #b9203820; }
body .ene-gallery .ene-gallery-thumb:focus-visible { outline-offset: 0; outline-width: 3px; }
body .ene-gallery-empty { padding: 40px; border-radius: 20px; background: #fff; border: 1px solid #dce6ed; color: #67788a; }
body .ene-gallery-error, body .ene-gallery-lightbox .ene-gallery-error { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; background: #fff; color: #183955; padding: 14px 20px; border-radius: 12px; font-size: 13px; max-width: calc(100% - 130px); pointer-events: none; }
body .ene-gallery .ene-gallery-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

body dialog.ene-gallery-lightbox { display: none; position: fixed; inset: 0; width: min(1400px, calc(100vw - 48px)); max-width: none; height: min(920px, calc(100dvh - 48px)); max-height: none; padding: 0; margin: auto; border: 1px solid #ffffff26; border-radius: 19px; color: #fff; background: #101e29; box-shadow: 0 25px 100px #0008; overflow: hidden; }
body dialog.ene-gallery-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
body dialog.ene-gallery-lightbox::backdrop { background: #07111be8; backdrop-filter: blur(5px); }
body .ene-gallery-lightbox-toolbar { display: flex; align-items: center; gap: 20px; padding: 12px 17px 12px 24px; border-bottom: 1px solid #ffffff1a; }
body .ene-gallery-lightbox-brand { color: #fff; font-size: 17px; letter-spacing: -.5px; font-weight: 700; }
body .ene-gallery-lightbox-brand b { color: #ffda3d; }
body .ene-gallery-lightbox-count { margin-left: auto; color: #d2dce3; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1.5px; }
body .ene-gallery-lightbox .ene-gallery-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff3b; border-radius: 50%; color: #fff; background: #ffffff0d; }
body .ene-gallery-lightbox .ene-gallery-close:hover { background: #ffffff26; box-shadow: none; }
body .ene-gallery-lightbox .ene-gallery-close svg { width: 22px; height: 22px; }
body .ene-gallery-lightbox-stage { position: relative; min-height: 0; min-width: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom; }
body .ene-gallery-lightbox-stage > img { display: block; height: 100%; width: 100%; max-height: 100%; max-width: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
body .ene-gallery-lightbox-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding: .5rem 1.5rem; border-top: 1px solid #ffffff24; }
body .ene-gallery-lightbox-caption { flex: 1 1 12rem; color: #d2dce3; font-size: .875rem; line-height: 1.5; }
body .ene-gallery-lightbox .ene-gallery-share { min-height: 44px; padding: .4rem .8rem; background: transparent; color: #fff; border: 1px solid #ffffff60; border-radius: 8px; font-size: .875rem; }
body .ene-gallery-lightbox .ene-gallery-share:hover { background: #ffffff16; }
body .ene-gallery-share-status { color: #ffda3d; font-size: .875rem; }
body .ene-gallery-share-status:empty { position: absolute; }
body .ene-gallery-share-fallback { display: grid; flex: 1 0 100%; gap: .25rem; min-width: 0; font-size: .875rem; color: #fff; }
body .ene-gallery-share-fallback input { width: 100%; min-width: 0; padding: .45rem .6rem; border-radius: 6px; background: #fff; color: #183955; font: inherit; }

@media (max-width: 640px) {
  body .public-page.gallery-page .page-hero { padding-top: 24px; padding-bottom: 25px; }
  body .public-page.gallery-page .page-hero h1 { font-size: 34px; margin: 9px 0 10px; letter-spacing: -1px; }
  body .public-page.gallery-page .page-hero p { font-size: 13px; }
  body .public-page.gallery-page > section.content { padding-top: 12px; }
  body .ene-gallery-heading { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  body .ene-gallery-eyebrow { font-size: 8px; letter-spacing: 1.4px; }
  body .ene-gallery-heading h2 { font-size: 25px; letter-spacing: -.8px; margin-top: 9px; }
  body .ene-gallery-total { font-size: 10px; padding: 6px 9px; margin-top: 2px; }
  body .ene-gallery-stage { height: auto; min-height: 260px; max-height: 52svh; aspect-ratio: 4 / 3; border-radius: 17px; }
  body .ene-gallery .ene-gallery-open { position: absolute; inset: 0; }
  body .ene-gallery .ene-gallery-arrow { width: 44px; height: 44px; margin-top: -22px; background: #ffffffea; }
  body .ene-gallery .ene-gallery-previous, body .ene-gallery-lightbox .ene-gallery-previous { left: 9px; }
  body .ene-gallery .ene-gallery-next, body .ene-gallery-lightbox .ene-gallery-next { right: 9px; }
  body .ene-gallery .ene-gallery-expand { right: 10px; bottom: 10px; padding: 7px 9px; min-height: 33px; font-size: 10px; }
  body .ene-gallery-count { left: 10px; bottom: 10px; padding: 6px 9px; font-size: 10px; }
  body .ene-gallery-caption { padding: 12px 1px 14px; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
  body .ene-gallery-swipe-hint { display: block; }
  body .ene-gallery-thumbnails { gap: 8px; }
  body .ene-gallery .ene-gallery-thumb { flex-basis: 82px; width: 82px; height: 62px; min-height: 62px; border-radius: 9px; }
  body .ene-gallery .ene-gallery-thumb img { border-radius: 5px; }
  body dialog.ene-gallery-lightbox { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  body .ene-gallery-lightbox-toolbar { padding: max(10px, env(safe-area-inset-top)) 12px 10px 17px; gap: 14px; }
  body .ene-gallery-lightbox-brand { font-size: 15px; }
  body .ene-gallery-lightbox .ene-gallery-arrow { width: 44px; height: 44px; margin-top: -22px; background: #ffffffd9; }
  body .ene-gallery-lightbox-footer { padding: .45rem 1rem max(.65rem, env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  body .ene-gallery-heading { flex-wrap: wrap; gap: 10px; }
  body .ene-gallery-total { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body .ene-gallery *, body .ene-gallery-lightbox * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
