#home .history-gallery-open{display:block;width:100%;border:0;padding:0;background:transparent;text-align:left;color:inherit;cursor:pointer}
#home .overview-history-photo .history-photo-open>img{display:block;width:100%;height:auto;aspect-ratio:4/5;max-height:540px;object-fit:cover;object-position:center 42%;filter:sepia(.12) saturate(.8) contrast(.96) brightness(1.08)}
.history-gallery-cta{display:flex;justify-content:space-between;align-items:center;padding:16px 0;border-bottom:1px solid #b9a58e;font-size:14px;letter-spacing:.05em}.history-gallery-cta>span{font-size:22px}.history-gallery-open:hover .history-gallery-cta{color:#8b6e51}.history-gallery-open:focus-visible{outline:2px solid #9b8062;outline-offset:5px}
#history-gallery{box-sizing:border-box;width:min(1080px,calc(100% - 64px));max-height:88vh;border:1px solid #c9bba7;background:#f2ede3;color:#51473e;padding:32px 38px;box-shadow:0 20px 90px #22170d33}#history-gallery::backdrop{background:#211a14a8}.history-gallery-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.history-gallery-head h2{font-size:28px;font-weight:400;margin:10px 0}.history-gallery-close,.history-gallery-back{font-size:14px;min-height:44px;padding:10px 0;color:inherit;background:none;border:0;cursor:pointer}.history-gallery-intro{font-size:14px;line-height:2;color:#827363;margin:12px 0 26px}.history-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px 22px}.history-gallery-grid button{padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer}.history-gallery-grid img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;filter:sepia(.12) saturate(.8) contrast(.96) brightness(1.08)}.history-gallery-grid span{display:block;font-size:13px;line-height:1.8;padding-top:10px}.history-gallery-grid button:hover img{opacity:.85}.history-gallery-view[hidden],.history-gallery-grid[hidden]{display:none}.history-gallery-view figure{margin:0;text-align:center}.history-gallery-view figure img{display:block;width:100%;height:54vh;object-fit:contain;filter:sepia(.12) saturate(.8) contrast(.96) brightness(1.08)}.history-gallery-view figcaption{font-size:14px;margin-top:16px;line-height:1.8}.history-gallery-controls{display:flex;justify-content:center;gap:28px;align-items:center;margin-top:16px}.history-gallery-controls button{border:1px solid #c4b29b;background:transparent;color:inherit;width:48px;height:44px;cursor:pointer}.history-gallery-count{font-size:12px;color:#827363}#history-gallery button:focus-visible{outline:2px solid #94795c;outline-offset:4px}

#history-gallery{padding:0;border:0;background:transparent;overflow:visible;max-height:none;box-shadow:none}
.history-gallery-scroll{box-sizing:border-box;max-height:84vh;overflow:auto;overscroll-behavior:contain;padding:32px 38px;background:#f2ede3;border:1px solid #c9bba7;box-shadow:0 20px 90px #22170d33}
#history-gallery>.history-gallery-close{position:absolute;top:-24px;right:-24px;z-index:5;display:flex;align-items:center;justify-content:center;width:72px;height:72px;min-height:0;padding:0;border:1px solid #c5b299;border-radius:50%;background:#f2ede3;color:#51473e;font-size:13px;box-shadow:0 4px 18px #22170d22;cursor:pointer}
#history-gallery>.history-gallery-close:hover{background:#e6dccc}
.history-gallery-head{padding-right:30px}

#history-gallery::backdrop{backdrop-filter:none}

/* 外観写真の拡大と、アルバムを開く操作を分ける。 */
#home .history-photo-open{display:block;position:relative;width:100%;border:0;padding:0;background:var(--paper);cursor:zoom-in}
.history-photo-zoom{position:absolute;right:12px;bottom:12px;display:grid;place-items:center;width:38px;height:38px;border:1px solid #ae9780;border-radius:50%;background:#eee8def0;color:#51483f}
.history-photo-zoom svg{width:22px;height:22px}.history-photo-open:focus-visible{outline:2px solid #94795c;outline-offset:4px}
#history-gallery.is-photo-view{width:min(1440px,calc(100vw - 64px));max-width:calc(100vw - 64px)}
#history-gallery.is-photo-view .history-gallery-scroll{max-height:92dvh;padding:16px 20px}
#history-gallery.is-photo-view .history-gallery-head{display:none}
#history-gallery.is-photo-view .history-gallery-view figure img{height:calc(92dvh - 160px);object-fit:contain}
@media(max-width:700px){
 #history-gallery.is-photo-view{width:calc(100vw - 12px);max-width:calc(100vw - 12px)}
 #history-gallery.is-photo-view .history-gallery-scroll{max-height:calc(100dvh - 12px);padding:54px 6px 14px}
 #history-gallery.is-photo-view .history-gallery-back{padding:0 8px 10px;min-height:36px}
 #history-gallery.is-photo-view .history-gallery-view figure img{height:auto;max-height:calc(100dvh - 225px);width:100%;object-fit:contain}
 #history-gallery.is-photo-view .history-gallery-view figcaption{margin-top:12px;padding-inline:8px}
}
