:root {
  --bg: #111214;
  --bg-elevated: #191a1d;
  --border: #2a2b2f;
  --text: #e8e6e1;
  --text-dim: #9a9a9e;
  --accent: #c9a15a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.site-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

main { padding: 1.5rem; }

.breadcrumbs { margin-bottom: 1rem; color: var(--text-dim); font-size: 0.9rem; }
.breadcrumbs a { color: var(--text-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.4rem; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.tile {
  position: relative;
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }

.tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #000;
}

.folder-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.folder-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.8rem;
}

.tile-label {
  display: block;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty { color: var(--text-dim); }

.lightbox { display: flex; flex-direction: column; align-items: center; }
.lightbox-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.back-link { color: var(--text-dim); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.position { color: var(--text-dim); font-size: 0.85rem; }

.lightbox-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.full-image {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 4px;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:hover { background: rgba(0,0,0,0.7); color: var(--accent); }
.nav-prev { left: 0.5rem; }
.nav-next { right: 0.5rem; }

.filename { margin-top: 0.75rem; color: var(--text-dim); font-size: 0.9rem; }
