:root {
  --bg: #0e1117; --surface: #161b25; --surface-2: #1f2633; --border: #2a3242;
  --text: #e8ecf3; --muted: #9aa4b5; --accent: #4ade80; --accent-ink: #06240f;
  --radius: 12px; --gap: 24px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

header, main, footer { max-width: 1200px; margin: 0 auto; padding: 0 var(--gap); }
header { padding-top: 56px; padding-bottom: 8px; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; }
.lede { color: var(--muted); max-width: 60ch; margin: 8px 0 24px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--gap); }
.chip { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); grid-auto-flow: dense; gap: var(--gap); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card.wide { grid-column: 1 / -1; }
.card.wide .media:not([data-embed]) { aspect-ratio: 21 / 9; }
.card[hidden] { display: none; }
.media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.media > img, .media > video, .media > iframe, .media > model-viewer { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.media.contain > img { object-fit: contain; }
.media.shots { display: flex; gap: 8px; padding: 8px; overflow-x: auto; scroll-snap-type: x mandatory; place-items: initial; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.media.shots > img { width: auto; height: 100%; flex: none; object-fit: contain; border-radius: 8px; scroll-snap-align: start; }
.media .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.media .status { position: absolute; color: var(--muted); }
model-viewer { --poster-color: var(--surface-2); background: radial-gradient(circle at 50% 40%, #2b3546, var(--surface-2)); }

.body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.body h2 { margin: 0; font-size: 1.2rem; }
.body p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; padding: 0; margin: 4px 0 0; list-style: none; font-size: .8rem; color: var(--muted); }
.tags li + li::before { content: "·"; margin: 0 8px; opacity: .6; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: .9rem; max-width: 100%; }

.empty { color: var(--muted); text-align: center; padding: 48px 0; }
footer { color: var(--muted); font-size: .85rem; padding-top: 48px; padding-bottom: 48px; }

@media (max-width: 600px) {
  :root { --gap: 16px; }
  .grid { grid-template-columns: 1fr; }
}
