/* Photographic collections have their own modal layout, outside the map layers. */
dialog.battle-gallery{position:fixed;inset:24px;margin:0;width:auto;height:calc(100svh - 48px);max-width:none;max-height:none;padding:0;overflow:hidden;border:1px solid #8a927a66;border-radius:8px;background:#101513;color:#efede6;box-shadow:0 20px 100px #0009;font-family:Arial,Helvetica,sans-serif}
.battle-gallery::backdrop{background:#060a09e0;backdrop-filter:blur(8px)}
.battle-gallery[open]{animation:gallery-arrival .26s ease both}
.gallery-shell{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0}
.gallery-header{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:19px 26px;border-bottom:1px solid #71806944;background:#16201b}
.gallery-heading{min-width:0}
.gallery-eyebrow{font:10px/1.5 Arial,Helvetica,sans-serif;letter-spacing:1.7px;text-transform:uppercase;color:#d8bd81}
.gallery-heading h2{font:700 clamp(27px,2.5vw,39px)/1.06 Barlow,Impact,'Arial Narrow',sans-serif;letter-spacing:.1px;margin:5px 0 0;text-wrap:balance}
.gallery-close{display:flex;align-items:center;justify-content:center;gap:14px;min-width:44px;min-height:44px;padding:9px 10px;border:1px solid #a9b49b55;border-radius:4px;color:#e9e8dc;flex-shrink:0}
.gallery-close span{font-size:12px;white-space:nowrap}
.gallery-close svg,.gallery-step svg{height:23px;width:23px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.gallery-close:hover,.gallery-step:hover:not(:disabled){background:#344033;color:#f5dfa6;border-color:#dec384}
.gallery-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,320px);min-height:0;min-width:0}
.gallery-stage{position:relative;background:#080c0b;min-width:0;min-height:0;padding:18px 60px;overflow:hidden}
.gallery-image-frame,.gallery-image-slot{width:100%;height:100%;min-height:0;position:relative}
.gallery-image-frame{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}
.gallery-photograph{display:block;width:100%;height:100%;object-fit:contain;object-position:center;opacity:0;transition:opacity .3s ease;filter:none}
.gallery-image-ready .gallery-photograph{opacity:1}
.gallery-image-message{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;padding:20px;color:#b9c3b5;font-size:13px;line-height:1.6}
.gallery-image-message[hidden],.gallery-image-badge[hidden],.gallery-caption [hidden],.gallery-footer[hidden],.gallery-retry[hidden],.gallery-step[hidden],.gallery-thumbnail img[hidden]{display:none}
.gallery-retry{padding:10px 16px;border:1px solid #c1ad7f;color:#ead49f;font-size:12px;min-height:44px;border-radius:3px}
.gallery-step{position:absolute;z-index:1;top:50%;transform:translateY(-50%);display:grid;place-items:center;min-width:42px;min-height:48px;padding:9px;background:#172019e6;border:1px solid #84917b77;border-radius:4px;color:#ead7a7}
.gallery-previous{left:10px}.gallery-next{right:10px}
.gallery-step:disabled{opacity:.23;background:transparent;border-color:transparent;cursor:default}
.gallery-image-badge{position:absolute;top:28px;left:70px;font-size:10px;line-height:1.4;letter-spacing:.5px;color:#f3dc9c;background:#15211bef;border:1px solid #e2c78066;padding:7px 10px;border-radius:3px;pointer-events:none}
.gallery-caption{padding:27px 26px;overflow:auto;overscroll-behavior:contain;border-left:1px solid #71806944;min-width:0;min-height:0;scrollbar-color:#788365 transparent;scrollbar-width:thin}
.gallery-position{font:10px/1.5 Arial,Helvetica,sans-serif;letter-spacing:1px;text-transform:uppercase;color:#b7c0ae;font-variant-numeric:tabular-nums}
.gallery-caption h3{font:700 29px/1.12 Barlow,Impact,'Arial Narrow',sans-serif;letter-spacing:0;margin:15px 0 12px;text-wrap:balance;color:#f2eddc}
.gallery-metadata{font-size:11px;line-height:1.6;color:#d4bb85;margin-bottom:20px}
.gallery-description{font:14px/1.7 Arial,Helvetica,sans-serif;color:#dce0d5}
.gallery-connection{margin-top:25px;padding:19px 0 0;border-top:1px solid #86917444}
.gallery-connection>p:last-child{font-size:13px;line-height:1.65;color:#c6d0bf;margin-top:8px}
.gallery-versions{display:flex;gap:5px;flex-wrap:wrap;margin-top:24px}
.gallery-version{min-height:40px;padding:9px 11px;border:1px solid #7c8d7355;border-radius:3px;font-size:11px;line-height:1.35;color:#c7d0be}
.gallery-version[aria-pressed="true"]{border-color:#d4b878;background:#dcc081;color:#172119}
.gallery-version[aria-pressed="true"]:hover{color:#172119;background:#ead299}
.gallery-restoration-note{font-size:11px;line-height:1.65;color:#d7c08d;margin-top:12px}
.gallery-provenance{margin-top:27px;padding-top:19px;border-top:1px solid #86917444}
.gallery-credit{font-size:10px;line-height:1.7;color:#aebaa4}
.gallery-source{display:inline-block;font-size:11px;line-height:1.6;color:#e0c48c;margin-top:10px;text-decoration:underline;text-decoration-color:#e0c48c66;text-underline-offset:4px;overflow-wrap:anywhere}
.gallery-footer{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:12px 26px;border-top:1px solid #71806944;background:#151e19;min-width:0}
.gallery-thumbnails{display:flex;align-items:center;gap:10px;overflow:auto;min-width:0;padding:5px;scrollbar-width:thin;scrollbar-color:#647159 transparent}
.gallery-thumbnail{display:block;position:relative;width:94px;height:65px;padding:0;flex:0 0 94px;overflow:hidden;border:1px solid #84917966;border-radius:3px;background:#283126;opacity:.56;transition:opacity .18s ease,border-color .18s ease}
.gallery-thumbnail img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;filter:none}
.gallery-thumbnail:hover,.gallery-thumbnail[aria-current="true"]{opacity:1;border-color:#f0d391}
.gallery-thumbnail[aria-current="true"]{box-shadow:0 0 0 2px #d8bd81}
.gallery-thumbnail-number{position:absolute;right:4px;bottom:4px;font:10px/1 Arial,sans-serif;padding:4px 5px;background:#09100de6;color:#f2e7cb;border-radius:2px;font-variant-numeric:tabular-nums}
.gallery-navigation-hint{font-size:10px;line-height:1.6;color:#a7b49c;flex-shrink:0;max-width:155px;text-align:right}
.battle-gallery button:focus-visible,.battle-gallery a:focus-visible{outline:2px solid #f3d28a;outline-offset:3px}
@keyframes gallery-arrival{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1650px){dialog.battle-gallery{inset:36px;max-width:1800px;margin:auto;height:calc(100svh - 72px)}.gallery-body{grid-template-columns:minmax(0,1fr) 350px}.gallery-caption{padding:32px}.gallery-stage{padding-block:24px}}
@media(max-width:900px){dialog.battle-gallery{inset:12px;height:calc(100svh - 24px)}.gallery-body{grid-template-columns:minmax(0,1fr) 260px}.gallery-header{padding:15px 20px}.gallery-caption{padding:22px 19px}.gallery-stage{padding-inline:52px}.gallery-step{min-width:38px;min-height:44px;padding:7px}.gallery-previous{left:7px}.gallery-next{right:7px}.gallery-image-badge{left:61px}.gallery-footer{padding:10px 20px}.gallery-navigation-hint{max-width:130px}}
@media(max-width:680px){
 dialog.battle-gallery{inset:0;width:100%;height:100svh;max-height:100svh;border:0;border-radius:0;margin:0}
 .gallery-header{padding:max(14px,env(safe-area-inset-top)) 16px 14px;gap:12px}
 .gallery-heading h2{font-size:29px;line-height:1.06;margin-top:4px}
 .gallery-eyebrow{font-size:9px;letter-spacing:1.4px}
 .gallery-close{width:44px;padding:10px}.gallery-close span{display:none}
 .gallery-body{display:block;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .gallery-stage{height:min(49svh,420px);min-height:210px;padding:14px 47px}
 .gallery-step{min-height:44px;min-width:36px;padding:6px}.gallery-previous{left:5px}.gallery-next{right:5px}
 .gallery-image-badge{top:20px;left:52px;font-size:9px;padding:5px 7px}
 .gallery-caption{padding:23px 22px 27px;overflow:visible;border-left:0;border-top:1px solid #71806944}
 .gallery-caption h3{font-size:28px;margin-top:11px}.gallery-metadata{margin-bottom:15px}
 .gallery-description{font-size:14px}.gallery-connection{margin-top:20px;padding-top:15px}
 .gallery-provenance{margin-top:21px;padding-top:15px}
 .gallery-footer{padding:8px 13px max(9px,env(safe-area-inset-bottom));gap:0}
 .gallery-thumbnails{width:100%;gap:9px;padding:5px}.gallery-thumbnail{height:53px;width:77px;flex-basis:77px}
 .gallery-navigation-hint{display:none}
}
@media(prefers-reduced-motion:reduce){.battle-gallery[open]{animation:none}.gallery-photograph,.gallery-thumbnail{transition:none}}
