:root { --bg:#f7f8f5; --surface:#fff; --text:#171916; --muted:#7e8279; --line:#e4e7df; --accent:#8da82c; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; color:var(--text); background:var(--bg); font-family:Arial,Helvetica,sans-serif; }
body.viewer-open { overflow:hidden; }
.gallery-page { width:min(1600px,calc(100% - 64px)); margin:0 auto; padding:28px 0 64px; }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:64px; margin-bottom:28px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:11px; font-size:21px; font-weight:800; letter-spacing:-.06em; }
.brand img { width:52px; height:52px; border-radius:50%; object-fit:contain; }
.notice { color:var(--muted); font-size:12px; text-align:right; }
.gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:14px; align-items:start; }
.photo-card { display:block; min-width:0; padding:0; border:1px solid var(--line); border-radius:7px; background:var(--surface); overflow:hidden; cursor:zoom-in; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.photo-card:hover { border-color:#d4d9ca; box-shadow:0 8px 24px rgba(23,29,13,.07); transform:translateY(-3px); }
.photo-image { display:flex; align-items:center; justify-content:center; width:100%; aspect-ratio:4/5; overflow:hidden; background:#ecefe9; }
.photo-image img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; }
.photo-title { display:block; min-height:3.1em; padding:9px 10px 10px; color:var(--text); font-size:12px; font-weight:700; line-height:1.55; text-align:left; overflow-wrap:anywhere; word-break:break-word; }
.status { padding:80px 0; color:var(--muted); text-align:center; }
.viewer { position:fixed; z-index:20; inset:0; display:grid; grid-template-columns:72px minmax(0,1fr) 72px; place-items:center; padding:28px; background:rgba(11,12,10,.98); opacity:0; transition:opacity .18s ease; }
.viewer[hidden] { display:none; }
.viewer.is-open { opacity:1; }
.viewer-figure { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; height:100%; margin:0; }
.viewer-figure img { width:auto; max-width:min(100%,1120px); height:auto; max-height:calc(100vh - 105px); object-fit:contain; }
.viewer-figure figcaption { max-width:min(90vw,900px); max-height:5.5em; padding-top:13px; overflow:auto; color:rgba(255,255,255,.8); font-size:12px; line-height:1.55; text-align:center; overflow-wrap:anywhere; }
.viewer-close,.viewer-arrow { display:grid; place-items:center; border:1px solid rgba(255,255,255,.24); color:#fff; background:rgba(0,0,0,.18); transition:color .18s ease,border-color .18s ease,background .18s ease; }
.viewer-close { position:absolute; top:20px; right:24px; width:40px; height:40px; border-radius:50%; font-size:27px; line-height:1; cursor:pointer; }
.viewer-arrow { width:46px; height:46px; border-radius:50%; font-size:37px; line-height:.7; cursor:pointer; }
.viewer-close:hover,.viewer-arrow:hover { border-color:var(--accent); color:var(--accent); background:rgba(255,255,255,.06); }
.viewer-prev { grid-column:1; grid-row:1; }
.viewer-next { grid-column:3; grid-row:1; }
@media (max-width:900px) { .gallery-page { width:min(100% - 36px,720px); } .gallery { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:11px; } .site-header { align-items:flex-start; flex-direction:column; } .notice { text-align:left; } }
@media (max-width:560px) { .gallery-page { width:calc(100% - 24px); padding-top:16px; } .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; } .viewer { grid-template-columns:42px minmax(0,1fr) 42px; padding:18px 8px; } .viewer-arrow { width:34px; height:34px; font-size:28px; } .viewer-close { top:12px; right:13px; } }
