:root {
  --bg: #0f0e0d; --fg: #d9d2c3; --muted: #6f6a60; --line: #23211d; --accent: #f3c87a;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 15px/1.6 -apple-system, "Helvetica Neue", "Hiragino Sans", sans-serif; padding: 0 16px 64px; max-width: 1040px; margin: 0 auto; }
header { padding: 56px 0 24px; }
h1 { font-weight: 400; font-size: 28px; letter-spacing: .02em; margin: 0 0 12px; }
h2 { font-weight: 400; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 40px 0 14px; }
.lede { color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn { background: transparent; color: var(--fg); border: 1px solid var(--fg); border-radius: 999px; padding: 8px 18px; font: inherit; cursor: pointer; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary { border-color: var(--accent); color: var(--accent); }
.btn.primary:hover { background: var(--accent); color: var(--bg); }
.muted { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card { background: #131211; border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; transition: border-color .2s; }
.card:hover { border-color: #3a362f; }
.card .img { aspect-ratio: 1; display: grid; place-items: center; }
.card .img svg, .card .img img { width: 100%; height: 100%; display: block; }
.card .cap { font-size: 12px; color: var(--muted); padding: 8px 4px 2px; display: flex; justify-content: space-between; }
.card .cap b { color: var(--fg); font-weight: 400; }
.card.skeleton .img { background: linear-gradient(90deg,#141312,#1a1816,#141312); background-size: 200% 100%; animation: sh 1.6s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

[hidden] { display: none !important; }
.viewer { position: fixed; inset: 0; background: rgba(8,8,7,.94); display: grid; place-items: center; z-index: 10; padding: 16px; }
.viewer-inner { position: relative; width: min(960px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center; }
@media (max-width: 720px) { .viewer-inner { grid-template-columns: 1fr; } }
.stage { aspect-ratio: 1; background: var(--bg); position: relative; overflow: hidden; border-radius: 6px; }
.stage svg { width: 100%; height: 100%; display: block; }
.stage .layer { position: absolute; inset: 0; }
.stage .reveal { clip-path: circle(0% at 50% 54%); animation: reveal 6s cubic-bezier(.3,0,.2,1) forwards; }
@keyframes reveal { to { clip-path: circle(80% at 50% 54%); } }
.stage .fadeout { animation: fade 1.4s ease forwards; }
@keyframes fade { to { opacity: 0; } }
.x { position: absolute; top: -40px; right: 0; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.meta .name { font-size: 18px; margin-bottom: 14px; }
.meta .words { font-size: 16px; line-height: 1.7; color: var(--fg); min-height: 3em; margin-bottom: 14px; white-space: pre-line; }
.meta .actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.status { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 1.6em; }
footer { margin-top: 64px; font-size: 12px; color: var(--muted); }
footer a { color: var(--muted); }
