@font-face{font-family:ACNGalleryJP;src:url("fonts/gallery-jp.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
/* Scoped to photo galleries; typography inherits the existing 城美人 page. */
.acn-gallery{margin:0 0 22px;min-width:0;border:1px solid #d8c9a5;border-radius:12px;overflow:hidden;background:#fffdf7;color:#272019;font-family:ACNGalleryJP,ACNBIZGothic,system-ui,sans-serif}
:is(#acn-scope,[data-acn]) .acn-gallery *{box-sizing:border-box}
:is(#acn-scope,[data-acn]) .acn-gallery button{font:inherit;cursor:pointer;letter-spacing:normal;text-transform:none;box-shadow:none}
.acn-gallery-stage{position:relative;background:#f3eee3;touch-action:pan-y pinch-zoom}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-open{display:block;width:100%;padding:0;border:0;border-radius:0;background:transparent;line-height:0}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-image{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;margin:0;border:0;border-radius:0}
:is(#acn-scope,[data-acn]) .acn-gallery button:focus-visible,.acn-photo-dialog button:focus-visible{outline:3px solid #097aa1;outline-offset:3px}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-step{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:54px;display:none;align-items:center;justify-content:center;padding:0;border:1px solid #bda36d;border-radius:8px;background:rgba(255,253,247,.94);color:#513a16;font:36px/1 Georgia,serif}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-step:hover{background:#f8e7bd}
.acn-gallery-prev{left:12px}.acn-gallery-next{right:12px}
.acn-gallery-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #ece1c9}
.acn-gallery-title{font-size:16px;font-weight:700;line-height:1.5}
.acn-gallery-count{font-family:Arial,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:18px;letter-spacing:.08em;color:#70531e}
.acn-gallery-thumbs{display:none;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;padding:12px 14px}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-thumb{display:block;min-width:0;padding:3px;border:2px solid transparent;border-radius:7px;background:transparent;color:#42351f}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-thumb[aria-pressed=true]{border-color:#a47c2c;background:#f7ebce}
.acn-gallery-thumb img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:3px;margin:0}
.acn-gallery-thumb span{display:block;font-size:12px;line-height:1.3;margin-top:5px;white-space:nowrap}
:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-disclaimer{margin:0;padding:0 16px 13px;color:#61594a;font-size:11px;line-height:1.65}
.acn-gallery-status{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.acn-gallery-ready :is(#acn-scope,[data-acn]) .acn-gallery-thumbs{display:grid}
.acn-gallery-ready :is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-step{display:flex}
.acn-gallery-ready .acn-gallery-open{cursor:zoom-in}
.acn-gallery-open::after{content:'拡大';position:absolute;right:12px;bottom:12px;padding:7px 12px;border-radius:5px;background:rgba(30,25,16,.76);color:white;font-size:12px;line-height:1;display:none}
.acn-gallery-ready .acn-gallery-open::after{display:block}
.acn-photo-dialog{position:fixed;inset:0;width:min(1440px,96vw);max-width:96vw;height:min(1000px,94dvh);max-height:94dvh;margin:auto;padding:0;border:1px solid #a58c57;border-radius:10px;background:#171612;color:#faf4e6;overflow:hidden;font-family:ACNGalleryJP,ACNBIZGothic,system-ui,sans-serif}
/* XWRITE resets dialog to display:block, including closed native dialogs. */
dialog.acn-photo-dialog:not([open]),dialog.acn-photo-dialog[hidden],dialog.acn-image-dialog:not([open]),dialog.acn-image-dialog[hidden]{display:none!important}
.acn-photo-dialog[open]:not([hidden]){display:flex;flex-direction:column}
.acn-photo-dialog::backdrop{background:rgba(10,9,7,.88)}
.acn-photo-dialog button{font:inherit;cursor:pointer;border:1px solid #9e8a61;border-radius:6px;background:#373127;color:#fff9e9;min-height:42px;padding:7px 13px;line-height:1.3;white-space:nowrap;box-shadow:none}
.acn-photo-dialog button:hover{background:#5c4b2d}
.acn-photo-toolbar{display:flex;align-items:center;gap:12px;padding:10px 14px;flex:none}
.acn-photo-title{flex:1;min-width:0;font-size:15px;line-height:1.5}
.acn-photo-count{font:16px/1.4 Arial,sans-serif;white-space:nowrap}
.acn-photo-stage{position:relative;flex:1;min-height:0}
.acn-photo-viewport{width:100%;height:100%;overflow:auto;display:grid;place-items:center;touch-action:pan-y pinch-zoom}
.acn-photo-dialog .acn-photo-image{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;margin:0;border:0;border-radius:0}
.acn-photo-dialog.is-zoomed .acn-photo-viewport{display:block;touch-action:pan-x pan-y pinch-zoom}
.acn-photo-dialog.is-zoomed .acn-photo-image{width:max(1536px,160%);height:auto;max-width:none;max-height:none}
.acn-photo-dialog .acn-photo-prev,.acn-photo-dialog .acn-photo-next{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:58px;padding:0;background:rgba(30,27,22,.84);font:38px/1 Georgia,serif}
.acn-photo-prev{left:12px}.acn-photo-next{right:12px}
.acn-photo-status{font-size:12px;line-height:1.5;font-family:inherit;color:#d9cfbb;text-align:center;min-height:18px;margin:8px 12px;flex:none}
.acn-gallery-badge{display:inline-block;margin-left:7px;padding:2px 7px;border:1px solid #bca56e;border-radius:4px;color:#72551c;background:#fff8e6;font-size:11px;line-height:1.5;vertical-align:middle;white-space:nowrap}
@media(max-width:600px){.acn-gallery-meta{padding:9px 11px}.acn-gallery-title{font-size:14px}.acn-gallery-count{font-size:16px}.acn-gallery-thumbs{gap:4px;padding:8px}:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-thumb{padding:2px}.acn-gallery-thumb span{font-size:10px}:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-step{width:36px;height:44px;font-size:29px}.acn-gallery-prev{left:6px}.acn-gallery-next{right:6px}:is(#acn-scope,[data-acn]) .acn-gallery .acn-gallery-disclaimer{padding:0 10px 10px;font-size:10px}.acn-photo-dialog{width:98vw;max-width:98vw;height:94dvh;max-height:94dvh}.acn-photo-toolbar{gap:7px;padding:8px;flex-wrap:wrap}.acn-photo-title{flex-basis:100%;font-size:14px}.acn-photo-count{margin-right:auto}.acn-photo-dialog .acn-photo-prev,.acn-photo-dialog .acn-photo-next{width:36px;height:48px}.acn-photo-prev{left:5px}.acn-photo-next{right:5px}}
