:root { --bg:#0d1321; --panel:#131b2d; --panel2:#1a2439; --line:#2b3b5e; --ink:#ece3cb; --dim:#9aa2b5; --amber:#ffb23f; --cyan:#4fd6c8; --red:#ff5a4e; --green:#7fd36b; --navy:#0a0f1a; --gut:clamp(16px,4vw,40px); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.7 "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--dim); font-size: 12px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 8px var(--gut); border-bottom: 1px solid var(--line); background: var(--navy); }
.top .back { color: var(--amber); text-decoration: none; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
main { max-width: 1280px; margin: 0 auto; padding: 0 var(--gut) 48px; }
.hero { padding: 24px 0 8px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 6vw, 40px); line-height: 1.2; color: var(--amber); }
.hero p { margin: 0 0 8px; max-width: 46em; font-size: 16px; }
.stats { color: var(--cyan); font-weight: 700; }
.filters { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.filters label { display: flex; flex-direction: column; font-size: 13px; color: var(--dim); gap: 2px; }
.filters .search { grid-column: span 2; }
.filters input[type=search], .filters select { font: inherit; font-size: 16px; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); padding: 8px; min-height: 44px; width: 100%; }
.filters .angle { flex-direction: row; align-items: center; gap: 8px; grid-column: span 2; }
.filters .angle input { flex: 1; min-height: 44px; }
.filters output { min-width: 3.2em; color: var(--ink); font-weight: 700; }
.count { color: var(--dim); margin: 10px 0; }
.grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.tile { background: var(--panel); border: 1px solid var(--line); color: var(--ink); padding: 6px 6px 8px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile:hover { border-color: var(--amber); }
.tile canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; background: #18202f; }
.tile.nopic { cursor: default; }
.tile.nopic .ph { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #161e2c 0 8px, #1a2333 8px 16px); color: var(--dim); font-size: 13px; }
.tile strong { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.tile small { font-size: 12px; color: var(--dim); line-height: 1.3; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 12px; padding: 0 6px; font-weight: 700; border: 1px solid currentColor; width: fit-content; }
.s-reviewed-ok { color: var(--green); } .s-designed { color: var(--cyan); } .s-needs-work { color: var(--amber); } .s-pending { color: var(--dim); }
.more-wrap { text-align: center; }
.more { font: inherit; font-weight: 700; background: var(--amber); color: var(--navy); border: 0; padding: 10px 24px; min-height: 44px; cursor: pointer; }
.legend { margin-top: 32px; background: var(--panel); border: 1px solid var(--line); padding: 16px 20px; }
.legend h2 { margin: 0 0 8px; font-size: 18px; color: var(--amber); }
.legend dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.legend dd { margin: 0; }
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
dialog::backdrop { background: rgba(5, 8, 15, .8); }
.vbox { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; font-size: 24px; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
#big { touch-action: none; cursor: grab; width: 100%; aspect-ratio: 1; image-rendering: pixelated; background: #18202f; }
.vctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vctl label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 180px; }
.vctl input { flex: 1; min-height: 44px; }
.vctl select { font: inherit; font-size: 16px; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); min-height: 44px; }
.vctl button { font: inherit; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); padding: 8px 14px; min-height: 44px; cursor: pointer; }
.vbox h2 { margin: 0; font-size: 20px; color: var(--amber); overflow-wrap: anywhere; }
.vmeta { margin: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); } .filters .search, .filters .angle { grid-column: 1 / -1; } }
[hidden] { display: none !important; }
@media (max-width: 700px) { .filters { position: static; } }
.vpairs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.vpairs span { font-size: 13px; color: var(--muted, #9aa); }
.vpairs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; min-width: 76px; max-width: 110px;
  background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; color: inherit; font-size: 12px; cursor: pointer; }
.vpairs canvas { width: 64px; height: 64px; image-rendering: pixelated; }
/* HD tier (2026-11-23): a mark in the list, loaded only in the viewer */
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.badge.hdmark { color: var(--navy); background: var(--amber); border-color: var(--amber); }
.stage { position: relative; display: grid; gap: 8px; grid-template-columns: 1fr; }
.stage figure { margin: 0; position: relative; min-width: 0; }
.stage figcaption { position: absolute; left: 6px; top: 4px; font-size: 13px; font-weight: 700; color: var(--amber); background: rgba(10,15,26,.75); padding: 0 6px; pointer-events: none; }
#big2 { touch-action: none; cursor: grab; width: 100%; aspect-ratio: 1; image-rendering: pixelated; background: #18202f; }
#big.panning, #big2.panning { cursor: move; }
dialog.wide { width: min(1040px, calc(100vw - 24px)); }
dialog.wide .stage { grid-template-columns: 1fr 1fr; }
.hdload { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 16px; background: rgba(10,15,26,.9); border: 1px solid var(--amber); color: var(--ink); font-weight: 700; text-align: center; max-width: 90%; }
.hdload::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--amber); border-right-color: transparent; border-radius: 50%; animation: hdspin .8s linear infinite; }
.hdload.err { border-color: var(--red); }
.hdload.err::before { display: none; }
@keyframes hdspin { to { transform: rotate(360deg); } }
.hdbar #hdBtn { background: var(--amber); color: var(--navy); border-color: var(--amber); font-weight: 700; }
.hdbar #hdBtn[aria-pressed="true"] { background: var(--panel2); color: var(--ink); border-color: var(--line); }
.hdbar .zoom { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.hdbar .zoom button { width: 44px; padding: 0; font-size: 20px; }
.hdbar .zoom button:disabled { opacity: .4; cursor: default; }
.hdbar output { min-width: 3em; text-align: center; font-weight: 700; }
@media (max-width: 480px) { dialog.wide .stage { gap: 4px; } .hdbar .zoom { margin-left: 0; } }
