:root {
  --bg: #0e0e12;
  --panel: #17171e;
  --text: #e8e8ec;
  --muted: #9a9aa5;
  --accent: #5b8def;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #26262f;
}

header h1 { font-size: 1.2rem; margin: 0; font-weight: 600; }

header nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}
header nav a:hover { text-decoration: underline; }

main {
  padding: 24px;
  max-width: 1500px;
  margin: 0 auto;
}

/* --- Live stack page --- */

@media (min-width: 900px) {
  main:not(.gallery) {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
  }
}

.stack-panel img {
  width: 100%;
  border-radius: 8px;
  display: block;
  background: #000;
}

.stack-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--panel);
  border-radius: 8px;
}

.info-panel {
  background: var(--panel);
  border-radius: 8px;
  padding: 20px;
}

.info-panel h2 { margin: 0 0 12px; font-size: 1.3rem; }

.info-panel dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0 0 16px;
}
.info-panel dt { color: var(--muted); font-size: 0.85rem; }
.info-panel dd { margin: 0; font-size: 0.95rem; }

.object-info {
  border-top: 1px solid #26262f;
  padding-top: 14px;
}
.object-info h3 { margin: 0 0 6px; font-size: 1rem; }
.object-info p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.4; color: var(--text); }
.object-info a { color: var(--accent); font-size: 0.85rem; text-decoration: none; }
.object-info a:hover { text-decoration: underline; }

/* --- Gallery page --- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
}

.gallery-item img {
  width: 100%;
  display: block;
}

.empty { color: var(--muted); }
