.mg-photo-direct{cursor:zoom-in}.mg-photo-direct:focus-visible{outline:2px solid #454d30;outline-offset:3px}
.mg-photo-trigger{position:fixed;width:44px;height:44px;display:grid;place-items:center;border:1px solid #d9d9cf;border-radius:50%;background:#fff;color:#454d30;box-shadow:0 2px 8px #0001;z-index:7;cursor:zoom-in;padding:10px}
.mg-photo-trigger[hidden]{display:none}.mg-photo-trigger svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;pointer-events:none}
.mg-photo-trigger:focus-visible,.mg-photo-dialog button:focus-visible{outline:2px solid #454d30;outline-offset:3px}
.mg-photo-dialog{margin:auto;position:fixed;inset:0;padding:0;width:min(1200px,96vw);max-width:96vw;height:min(900px,94dvh);max-height:94dvh;border:1px solid #e5e2d8;border-radius:12px;background:white;color:#282b22;overflow:hidden}
.mg-photo-dialog::backdrop{background:rgb(20 23 17 / 75%)}
.mg-photo-view{height:100%;display:flex;flex-direction:column;min-height:0}
.mg-photo-tools{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid #e5e2d8;flex:0 0 auto;flex-wrap:wrap}
.mg-photo-tools button{font:600 15px/1.2 system-ui;min-width:44px;min-height:44px;border:1px solid #e5e2d8;border-radius:8px;background:#f8f6f0;color:#282b22;cursor:pointer;padding:8px 12px}
.mg-photo-tools button:disabled{opacity:.4;cursor:default}.mg-photo-tools .mg-photo-close{margin-inline-start:auto}
.mg-photo-stage{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
.mg-photo-canvas{min-width:100%;min-height:100%;width:max-content;display:flex;align-items:center;justify-content:center}
.mg-photo-canvas img{display:block;max-width:none;max-height:none;object-fit:contain;flex:0 0 auto}
.mg-photo-caption{padding:10px 16px;margin:0;border-top:1px solid #e5e2d8;font:14px/1.4 system-ui;max-height:70px;overflow:auto;flex:0 0 auto}
@media(max-width:749px){.mg-photo-dialog{width:96vw;height:92dvh}.mg-photo-tools{padding:8px;gap:6px}.mg-photo-tools button{padding:8px}.mg-photo-caption{font-size:13px}}

body:has(.mg-photo-dialog[open]){overflow:hidden}
.mg-photo-canvas img{cursor:zoom-in}.mg-photo-canvas img.mg-photo-magnified{cursor:zoom-out}
