@font-face {
  font-family: "Paper Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/paper-mono-variable.woff2) format("woff2");
}

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --sunken: #eeece6;
  --ink: #161614;
  --ink-2: #4f4e49;
  --muted: #8b8982;
  --line: #e2e0d8;
  --line-2: #cfccc2;
  --accent: #c2410c;
  --ok: #3a7d44;
  --ok-bg: #e6efe6;
  --warn: #a16207;
  --warn-bg: #f6eddb;
  --danger: #b42318;
  --danger-bg: #f8e6e3;
  --code-bg: #1b1b19;
  --code-ink: #efeee9;
  --shadow: 0 1px 2px rgba(20,18,10,.05), 0 18px 40px -22px rgba(20,18,10,.35);
  --fx-1: #eb6a3c;
  --fx-2: #5670e4;
  --fx-alpha: .82;
  --fx-soft: 0;
  --fx-speed: 1;
  --veil: rgba(248, 247, 243, .74);
  --veil-line: rgba(20, 18, 10, .07);
  --radius: 12px;
  --serif: var(--mono);
  --mono: "Paper Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC";
  --sans: var(--mono);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --surface: #151516;
    --sunken: #1b1b1d;
    --ink: #ecebe6;
    --ink-2: #b4b3ad;
    --muted: #77766f;
    --line: rgba(255,255,255,.08);
    --line-2: rgba(255,255,255,.18);
    --accent: #f0915c;
    --ok: #7cc48a;
    --ok-bg: rgba(124,196,138,.12);
    --warn: #e0b35a;
    --warn-bg: rgba(224,179,90,.12);
    --danger: #f08a7e;
    --danger-bg: rgba(240,138,126,.12);
    --code-bg: #1b1b1d;
    --code-ink: #e6e5df;
    --shadow: 0 0 0 1px rgba(255,255,255,.06), 0 24px 48px -24px rgba(0,0,0,.8);
    --fx-1: #a8467c;
    --fx-2: #86bdf7;
    --fx-alpha: .85;
    --veil: rgba(16, 16, 17, .66);
    --veil-line: rgba(255, 255, 255, .07);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; color: var(--ink);
  font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }

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

/* ---------- editorial primitives ---------- */
.eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; margin: 0;
  font: 11px/1.8 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .rule { width: 36px; height: 1px; background: var(--line-2); }
.display {
  font: 400 clamp(1.75rem, 3.5vw, 2.5rem)/1.15 var(--serif); letter-spacing: -0.02em; margin: 10px 0 0;
}
/* Real italic for Latin only; CJK stays upright instead of a faux slant. */
.display em, .tagline, .glyph { font-synthesis: none; }
.display em { font-style: italic; color: var(--muted); }
.tagline { margin: 10px 0 0; font: italic 400 clamp(1rem, 1.6vw, 1.125rem)/1.5 var(--serif); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font: 12px/1 var(--mono); padding: 6px 10px; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--ink-2); transition: border-color .15s, color .15s, background .15s;
}
.pill:hover { color: var(--ink); border-color: var(--ink-2); }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tlinks { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
.tlinks a { border-bottom: 1px solid transparent; }
.tlinks a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- ambient field (fx.js) ---------- */
/* Ink wash palette (default): monochrome ink on paper, softer bleed, slower drift. */
:root[data-fx=ink] { --fx-1: #2a2826; --fx-2: #8f8a80; --fx-alpha: .8; --fx-soft: 1; --fx-speed: .6; }
@media (prefers-color-scheme: dark) {
  :root[data-fx=ink] { --fx-1: #dedbd3; --fx-2: #67645e; --fx-alpha: .7; }
}
.fx {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
}
.fx.on { opacity: 1; }

/* ---------- header / footer ---------- */
.top {
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.brand { font: 400 24px/1 var(--serif); letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; }
.brand:hover { color: var(--ink); }
/* Background switcher (header, right): only shown when JS can drive it. */
.fx-switch { display: none; gap: 2px; padding: 2px; margin-left: 4px; border: 1px solid var(--line); border-radius: 99px; }
.js .fx-switch { display: flex; }
.fx-switch button {
  font: inherit; letter-spacing: .08em; padding: 4px 9px; border: 0; border-radius: 99px;
  background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.fx-switch button:hover { color: var(--ink); }
.fx-switch button[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.top nav .back { color: var(--muted); }
.top nav .back:hover { color: var(--ink); }
.top nav { display: flex; align-items: center; gap: 22px; font: 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.foot {
  max-width: 1120px; margin: 0 auto; padding: 28px 24px 44px; border-top: 1px solid var(--line);
  display: flex; gap: 18px; font: 11px var(--mono); letter-spacing: .06em; color: var(--muted);
}

/* ---------- home ---------- */
.hero { padding: 20px 0 24px; }
.hero-title { font: 400 clamp(1.5rem, 2.8vw, 2rem)/1.25 var(--serif); letter-spacing: -0.015em; margin: 0 0 8px; }
.hero-title em { font-style: italic; color: var(--muted); }

.hero-by { margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.hero-by a { border-bottom: 1px solid var(--line-2); }
.hero-by a:hover { color: var(--ink); border-color: var(--ink); }

/* Platforms line on cards / project header */
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; margin: 0; font: 12px/1.4 var(--mono); color: var(--ink-2); }
.platforms svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .7; margin-right: 2px; }
.platforms i { font-style: normal; color: var(--line-2); }

/* 蹲开源 wish button (JS only): a small pill that pops and scatters ink sparks. */
.wish {
  display: none; position: relative; align-items: center; gap: 5px; margin-left: auto;
  font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer;
  padding: 4px 11px 4px 9px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--veil);
  transition: border-color .15s, color .15s, transform .15s;
}
.js .wish { display: inline-flex; }
.wish:hover { color: var(--ink); border-color: var(--ink-2); }
.wish:active { transform: scale(.94); }
.wish .wish-ico { color: var(--accent); font-size: 11px; transition: transform .5s cubic-bezier(.2,1.6,.4,1); }
.wish .wish-n:not(:empty) { font-size: 11px; color: var(--muted); padding-left: 5px; border-left: 1px solid var(--line-2); }
.wish.wished { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wish.pop { animation: wish-pop .45s cubic-bezier(.2,1.6,.4,1); }
.wish.pop .wish-ico { transform: rotate(144deg) scale(1.35); }
.wish-plus {
  position: absolute; left: 50%; top: -4px; pointer-events: none;
  font: 600 12px var(--mono); color: var(--accent); animation: wish-rise .9s ease-out forwards;
}
.wish-spark {
  position: absolute; left: 14px; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%;
  background: var(--accent); pointer-events: none; animation: wish-spark .7s ease-out forwards;
}
@keyframes wish-pop { 40% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes wish-rise { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -22px); } }
@keyframes wish-spark { from { opacity: .9; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
@media (prefers-reduced-motion: reduce) {
  .wish.pop, .wish-plus, .wish-spark { animation: none; }
  .wish-plus, .wish-spark { display: none; }
  .wish.pop .wish-ico { transform: none; }
}
.lede { max-width: 440px; margin: 12px 0 16px; color: var(--ink-2); }
.search input, input, select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search { max-width: 420px; margin-bottom: 14px; }
/* Tag bar: one row of the most used tags; "+N" reveals the rest. */
.tagbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.tagbar::-webkit-scrollbar { display: none; }
.tagbar .pill { flex: none; }
.tagbar .extra:not(.on) { display: none; }
.tagbar.open { flex-wrap: wrap; mask-image: none; }
.tagbar.open .extra { display: inline-block; }
.tagbar .more { background: none; cursor: pointer; color: var(--muted); }
.tagbar:not(:has(.more)) { mask-image: none; }
input:focus, select:focus, textarea:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
textarea { resize: vertical; font-family: var(--mono); font-size: 13.5px; line-height: 1.55; }

.index {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 28px;
  border-top: 1px solid var(--line); margin-bottom: 24px;
}
.index a {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2); min-width: 0;
}
.index a:hover { color: var(--ink); }
.index .mono { font-size: 10.5px; color: var(--muted); }
.index .i-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); flex: none; }
.dot.s-active { background: var(--ok); }
.dot.s-wip { background: var(--warn); }

.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 10px; }
.view-toggle { display: none; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 99px; }
.js .view-toggle { display: flex; }
.view-toggle button {
  font: 11px/1 var(--mono); letter-spacing: .12em; padding: 6px 11px; border: 0; border-radius: 99px;
  background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed=true] { background: var(--ink); color: var(--bg); }

.works { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
/* Each entry sits on a frosted veil so the moving ink behind stays ambient,
   not competing with the text. Without backdrop-filter the veil is just denser. */
.work {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center;
  padding: 40px 44px; scroll-margin-top: 16px; border-radius: 18px;
  background: var(--veil); border: 1px solid var(--veil-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .work { background: color-mix(in srgb, var(--bg) 92%, transparent); }
}
.w-text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.w-text .tagline { margin: -6px 0 0; }
.w-name { font: 400 clamp(1.75rem, 3.5vw, 2.5rem)/1.2 var(--serif); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.w-name a:hover { color: inherit; }
.ver { font-size: 11px; letter-spacing: .04em; color: var(--muted); margin-left: 12px; vertical-align: .7em; }
.w-text .tlinks { margin-top: 6px; }

.w-media {
  display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: var(--sunken); box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.w-media { position: relative; }
.w-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Portrait / square-ish screenshots are fitted by height (class set in app.js). */
.w-media.is-tall { display: flex; align-items: center; justify-content: center; background: var(--sunken); }
.w-media.is-tall img { width: auto; height: 90%; max-width: 90%; object-fit: contain; border-radius: 8px; box-shadow: var(--shadow); }
.js .w-media img, .js .w-icon img { opacity: 0; transition: opacity .4s ease; }
.js .w-media img.ready, .js .w-icon img.ready { opacity: 1; }
.w-media:hover { transform: translateY(-3px); }
/* Projects whose cover is an app icon (or none): small icon above the title, no frame. */
.work.no-media { grid-template-columns: minmax(0, 1fr); padding: 32px 44px; }
.work.no-media .w-text { max-width: 640px; }
.w-icon { display: block; width: 64px; height: 64px; margin-bottom: 2px; }
.w-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(20,18,10,.16)); }
.w-icon span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 22.4%;
  font: italic 400 34px/1 var(--serif); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
}

/* grid view: same entries, stacked media-first and packed into columns */
[data-view=grid] .index { display: none; }
[data-view=grid] .works {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding-top: 18px;
}
[data-view=grid] .work { grid-template-columns: 1fr; gap: 18px; padding: 24px; align-items: start; }
[data-view=grid] .w-media { order: -1; }
[data-view=grid] .w-text { gap: 12px; }
[data-view=grid] .w-name { font-size: clamp(1.5rem, 2.2vw, 1.75rem); }
[data-view=grid] .tagline { font-size: 1rem; }
[data-view=grid] .work.no-media { padding: 24px; }
[data-view=grid] .w-icon { width: 52px; height: 52px; }

/* one-time reveal; content stays visible without JS */
.js .work { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .work.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .work { opacity: 1; transform: none; transition: none; }
  .w-media, .w-media:hover { transition: none; transform: none; }
}

/* Corner badges: open/closed source + lifecycle status. */
.work { position: relative; }
.badges { display: flex; gap: 6px; }
.work > .badges { position: absolute; top: 18px; right: 20px; z-index: 1; }
.badge {
  font: 10.5px/1 var(--mono); letter-spacing: .06em; padding: 5px 8px; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--veil);
}
.badge.b-open { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.badge.s-active { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.badge.s-wip { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.status { flex: none; font-size: 10.5px; padding: 1px 7px; border-radius: 5px; background: var(--sunken); color: var(--ink-2); }
.s-active { background: var(--ok-bg); color: var(--ok); }
.s-wip { background: var(--warn-bg); color: var(--warn); }
.pin { color: var(--accent); font-size: 10px; }

.empty { text-align: center; padding: 80px 0; color: var(--ink-2); }
.empty .display { color: var(--muted); margin: 0 0 12px; }

/* ---------- project page ---------- */
.project { max-width: 820px; margin: 0 auto; padding-top: 20px; }
.p-head { display: flex; flex-direction: column; gap: 16px; }
.p-head .display { margin: 4px 0 0; overflow-wrap: anywhere; }
.p-icon { width: 72px; height: 72px; margin-top: 4px; }
.p-head .tagline { margin: -4px 0 0; }
.p-head .tlinks { margin-top: 4px; }
.edit-link { margin-left: auto; }

.download { margin: 44px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 10px; }
.dl-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.label { font-weight: 600; }
.files { list-style: none; margin: 0; padding: 0; }
.file { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.file:first-child { border-top: 0; }
.f-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.f-name::before { content: "↓"; color: var(--accent); margin-right: 8px; font-weight: 700; }
.f-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.f-sha { background: none; border: 0; padding: 0; color: var(--muted); opacity: .7; font-size: 11px; cursor: copy; }
.f-sha:hover { color: var(--ink-2); opacity: 1; }
.files.compact .file { padding: 6px 0; font-size: 13.5px; }

.shots { display: flex; gap: 16px; overflow-x: auto; margin: 36px -24px 0; padding: 4px 24px 20px; scroll-snap-type: x mandatory; }
.shot-frame { flex: none; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; }
.shot-frame img { height: 340px; width: auto; max-width: none; }

.prose { margin-top: 36px; font-size: 15.5px; }
.prose h1, .prose h2, .prose h3 { margin: 1.6em 0 .5em; font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.prose h1 { font-size: 32px; } .prose h2 { font-size: 27px; } .prose h3 { font-size: 22px; }
.prose p, .prose ul, .prose ol { margin: .6em 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--sunken); padding: 1px 5px; border-radius: 5px; }
.prose pre { background: var(--code-bg); color: var(--code-ink); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { border-radius: 10px; border: 1px solid var(--line); }
.prose a { color: var(--accent); }
.prose table { border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--line); padding: 4px 10px; }
.prose blockquote { margin: .8em 0; padding-left: 14px; border-left: 2px solid var(--line-2); color: var(--ink-2); }
.small-prose { margin: 4px 0 6px; font-size: 14px; color: var(--ink-2); }

.sec { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 48px 0 14px; }
.panel .sec { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 24px 22px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink-2); }
.timeline li:first-child::before { background: var(--ink); border-color: var(--ink); }
.v-head { display: flex; gap: 10px; align-items: baseline; }
.v-name { font-weight: 600; }

/* ---------- admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 18px; gap: 12px; }
.admin-head h1 { font: 400 40px/1.05 var(--serif); letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; }
.list { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.list th { text-align: left; font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); }
.list td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.list tr:first-child td { border-top: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; }
.form label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.form label input, .form label select, .form label textarea { margin-top: 5px; }
.form label.check { display: flex; gap: 8px; align-items: center; }
.form label.check input { width: auto; margin: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cols.three { grid-template-columns: 1fr 1fr 1fr; }
.actions { display: flex; gap: 10px; align-items: center; }
.actions.end { align-items: flex-end; padding-bottom: 12px; }
.btn {
  display: inline-block; font: inherit; font-size: 14px; font-weight: 550; cursor: pointer;
  padding: 9px 16px; border-radius: 99px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: opacity .15s, border-color .15s;
}
.btn:hover { color: var(--bg); opacity: .85; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink-2); opacity: 1; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger-bg); }
.btn.danger:hover { color: var(--danger); background: var(--danger-bg); }
.btn:disabled { opacity: .5; cursor: wait; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.danger { color: var(--danger); }
.x { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.x:hover { color: var(--danger); background: var(--danger-bg); }
.upload { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.upload input[type=file] { flex: 1; min-width: 200px; padding: 8px; font-size: 13px; background: var(--bg); border-style: dashed; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shot-grid figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; background: var(--bg); }
.shot-grid img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-grid form { position: absolute; top: 4px; right: 4px; }
.shot-grid .x { background: var(--surface); }
[data-paste-upload].busy { opacity: .5; }
.version { border-top: 1px solid var(--line); padding: 12px 0; }
.version summary { cursor: pointer; display: flex; gap: 12px; align-items: baseline; list-style: none; }
.version summary::-webkit-details-marker { display: none; }
.version summary::before { content: "▸"; color: var(--muted); font-size: 11px; }
.version[open] summary::before { content: "▾"; }
.version > form, .version > ul { margin-top: 12px; }
.inline-form { margin-bottom: 8px; }
.plain { list-style: none; padding: 0; margin: 0 0 12px; }
.link-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.link-row:first-child { border-top: 0; }
.link-row a { overflow-wrap: anywhere; }
.code { background: var(--code-bg); color: var(--code-ink); padding: 12px 14px; border-radius: 10px; overflow-x: auto; font: 12.5px/1.5 var(--mono); margin: 6px 0 10px; }
.danger-zone form { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.agent { margin-top: 28px; }

@media (max-width: 760px) {
  .work, .work.no-media { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; }
  .w-media { order: -1; }
}
@media (max-width: 640px) {
  main { padding: 0 16px 48px; }
  .top { padding: 14px 16px; align-items: center; gap: 12px; }
  .top nav { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
  .fx-switch { margin-left: 0; }
  .foot { padding: 24px 16px 36px; }
  .hero { padding: 8px 0 20px; }
  .index { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .cols, .cols.three { grid-template-columns: 1fr; }
  .project { padding-top: 24px; }
  .shots { margin: 28px -16px 0; padding: 4px 16px 16px; }
  .shot-frame img { height: 240px; }
  .hide-sm { display: none; }
  .panel { padding: 16px; }
  .f-sha { display: none; }
  .admin-head h1 { font-size: 32px; }
}
