/* Bright: a light inverse of the stock simpleGals theme (demo fork). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: system-ui, sans-serif; background: #faf9f7; color: #1a1a1a; padding: 1rem; }

header { margin-bottom: 1.5rem; }
header h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
header p  { color: #666; font-size: 0.9rem; }

nav.pagination { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
nav.pagination a, nav.pagination span { padding: 0.3rem 0.7rem; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; color: #1a1a1a; font-size: 0.85rem; }
nav.pagination a:hover { background: #ececec; }
nav.pagination .current { background: #ddd; border-color: #bbb; }
nav.pagination .all-link { margin-left: auto; }

.gallery-grid { display: grid; grid-template-columns: repeat(var(--columns, 4), 1fr); gap: 0.75rem; }
.gallery-item a { display: block; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; display: block; box-shadow: 0 0 0 0 transparent; transition: box-shadow 175ms ease; }
.gallery-item a:hover img { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 2px 12px 2px rgba(0, 0, 0, 0.18); }
.gallery-item .caption { font-size: 0.8rem; color: #666; margin-top: 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.item-page { max-width: 900px; margin: 0 auto; }
.item-page img { width: 100%; height: auto; border-radius: 4px; display: block; margin: 1rem 0; }
.item-meta { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }
.item-meta span { margin-right: 1.5rem; }

.share-wrap { display: inline-flex; align-items: center; gap: 0.4rem; }
.share-btn { background: none; border: none; cursor: pointer; padding: 0; font-size: inherit; color: inherit; }
.share-hint { font-size: 0.8rem; color: transparent; white-space: nowrap; transition: color 150ms ease; }
.share-wrap:hover .share-hint { color: #666; }

nav.item-nav { display: flex; justify-content: space-between; margin-top: 1rem; }
nav.item-nav a { padding: 0.4rem 1rem; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; color: #1a1a1a; }
nav.item-nav a:hover { background: #ececec; }

footer { margin-top: 2rem; color: #999; font-size: 0.75rem; }
.back-link { color: inherit; text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.75rem; }
.back-hint { font-size: 0.7rem; font-weight: normal; color: transparent; white-space: nowrap; transition: color 150ms ease; }
.back-link:hover .back-hint { color: #999; }

.key-legend { position: fixed; top: 0.75rem; right: 1rem; font-size: 0.65rem; color: #c2185b; pointer-events: none; letter-spacing: 0.02em; }
.key-legend kbd { font-family: monospace; font-style: normal; }

.generated-by { text-align: center; margin-top: 0.75rem; }
.generated-by a { color: #999; text-decoration: none; }
.generated-by a:hover { color: #555; }

.download-btn { display: inline-block; padding: 0.3rem 0.7rem; font-size: 0.85rem; border: 1px solid #2a8; border-radius: 4px; background: rgba(34, 136, 136, 0.10); color: inherit; text-decoration: none; }
.download-btn:hover { background: rgba(34, 136, 136, 0.20); }
.download-row { margin: 0.5rem 0 1rem; }

:focus-visible { outline: 2px solid #c2185b; outline-offset: 2px; }

.exif { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem 1.5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #ddd; }
.exif .exif-field { margin: 0; }
.exif dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .04em; color: #999; }
.exif dd { margin: 0; font-size: 0.85rem; color: #333; }
