:root {
  --bg: #0f1115;
  --card: #171a21;
  --line: #262b36;
  --fg: #e7e9ee;
  --muted: #9aa3b2;
  --accent: #f472b6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}
header {
  padding: 28px 24px 12px;
  border-bottom: 1px solid var(--line);
}
h1 { margin: 0; font-size: 22px; letter-spacing: 0.5px; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
main { padding: 24px; }
.empty { color: var(--muted); text-align: center; padding: 48px 0; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card img, .card video {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000;
}
.card .meta { padding: 10px 12px; }
.card .meta strong { display: block; font-size: 14px; }
.card .meta span { color: var(--muted); font-size: 12px; }
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 10;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 92vh; text-align: center; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.lightbox figcaption { color: var(--muted); margin-top: 10px; font-size: 13px; }
.close {
  position: absolute; top: 16px; right: 20px; font-size: 30px; line-height: 1;
  background: none; border: none; color: #fff; cursor: pointer;
}
