.bottom-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
.stat-card.gallery-entry,.journal-stat.gallery-entry { color:var(--text); text-align:left; cursor:pointer; font:inherit; }
.gallery-entry:hover,.gallery-entry:focus-visible { border-color:var(--brand); outline:2px solid var(--brand); outline-offset:3px; }
.gallery-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:22px 0; flex-wrap:wrap; }
.gallery-toolbar label { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:14px; }
.gallery-toolbar select { max-width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; color:var(--text); background:var(--surface); font:inherit; }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:18px; }
.gallery-card { padding:0; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--text); text-align:left; cursor:pointer; box-shadow:var(--shadow-sm); }
.gallery-card:hover { border-color:var(--brand); }.gallery-card:focus-visible { outline:3px solid var(--brand); outline-offset:3px; }
.gallery-thumbnail { display:grid; place-items:center; position:relative; aspect-ratio:4/3; overflow:hidden; background:var(--brand-soft); }
.gallery-thumbnail img { width:100%; height:100%; object-fit:cover; grid-area:1/1; }
.gallery-thumbnail-status { grid-area:1/1; padding:18px; color:var(--muted); font-size:13px; text-align:center; }.gallery-thumbnail.loaded .gallery-thumbnail-status { display:none; }
.gallery-card-copy { display:grid; gap:7px; padding:14px; }.gallery-card-copy strong { font-size:14px; line-height:1.4; }.gallery-card-copy small { color:var(--muted); font-size:12px; }
.gallery-message { padding:38px 20px; border:1px dashed var(--line); border-radius:18px; text-align:center; color:var(--muted); }.gallery-message strong { display:block; color:var(--text); font-size:19px; }.gallery-message p { max-width:480px; margin:12px auto 20px; line-height:1.6; }
.gallery-lightbox[hidden] { display:none; }
.gallery-lightbox { position:fixed; inset:0; z-index:220; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:12px; padding:max(16px,var(--safe-top)) 24px max(20px,var(--safe-bottom)); background:rgba(5,13,10,.97); color:#fff; }
.gallery-lightbox-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }.gallery-lightbox-header p { margin:4px 0; color:#b6c5bd; font-size:13px; }.gallery-lightbox-header strong { font-size:18px; }
.gallery-lightbox button { min-width:46px; min-height:46px; border:1px solid #58675f; border-radius:13px; padding:9px 15px; background:#1a3025; color:#fff; font:inherit; cursor:pointer; }.gallery-lightbox button:focus-visible { outline:3px solid #a4e4b8; outline-offset:3px; }.gallery-lightbox button:disabled { opacity:.35; cursor:default; }
.gallery-stage { min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; text-align:center; }.gallery-stage img { max-width:100%; max-height:100%; object-fit:contain; min-height:0; border-radius:8px; touch-action:pan-y pinch-zoom; }.gallery-stage img[hidden] { display:none; }
.gallery-lightbox-footer { display:grid; justify-items:center; gap:10px; }.gallery-lightbox-footer p { margin:0; max-width:680px; max-height:60px; overflow:auto; color:#d1dfd6; font-size:14px; }.gallery-controls { display:flex; align-items:center; justify-content:center; gap:15px; }.gallery-controls output { min-width:70px; text-align:center; font-variant-numeric:tabular-nums; }
@media(max-width:600px){.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-card-copy{padding:10px}.gallery-card-copy strong{font-size:12px}.gallery-toolbar{display:grid;gap:12px}.gallery-toolbar label{display:grid;gap:6px}.gallery-toolbar select{width:100%}.gallery-lightbox{padding:max(12px,var(--safe-top)) 12px max(14px,var(--safe-bottom));gap:10px}.gallery-lightbox-header strong{font-size:15px}.gallery-lightbox-header p{font-size:12px}.gallery-lightbox-footer p{font-size:12px}.bottom-nav button{font-size:10px;min-width:0}}

.gallery-photo-button{display:block;width:100%;padding:0;border:0;background:transparent;cursor:pointer}
.map-memory-links{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 10px 59px}.map-memory-links button{min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;color:var(--brand);background:var(--surface);font:inherit;font-size:12px;cursor:pointer}.map-memory-links button:hover{text-decoration:underline}
.gallery-card-copy{display:flex;width:100%;align-items:center;text-align:left;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;gap:10px}.gallery-card-copy>span{display:grid;gap:5px}.gallery-map-inset{flex:0 0 68px;width:68px;height:65px;border:1px solid var(--line);border-radius:8px;overflow:hidden}.gallery-card button:focus-visible{outline:3px solid var(--brand);outline-offset:-3px}
@media(max-width:600px){.gallery-card-copy{flex-direction:column;align-items:flex-start}.gallery-map-inset{flex-basis:auto;width:76px;height:68px}.gallery-card-copy small{font-size:10px}}
