* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1b1b1b; color: #eee;
  font-family: Helvetica, Arial, sans-serif; }
body { display: flex; flex-direction: column; }
header { display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  background: #111; font-size: 14px; flex-wrap: wrap; }
header .title { flex: 1; min-width: 200px; }
header .title b { display: block; font-size: 15px; }
header .title span { color: #aaa; font-size: 12px; }
a { color: #8cc4ff; }
button, select { background: #333; color: #eee; border: 1px solid #555;
  border-radius: 4px; padding: 5px 10px; font-size: 14px; cursor: pointer; }
button:hover, select:hover { background: #444; }
select { max-width: 100%; }
#stage { flex: 1; position: relative; display: flex; align-items: center;
  justify-content: center; min-height: 0; padding: 8px; }
#slide { max-width: 100%; max-height: 100%; background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,.6); user-select: none; }
.zone { position: absolute; top: 0; bottom: 0; width: 40%; cursor: pointer; }
.zone.prev { left: 0; } .zone.next { right: 0; }
footer { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; background: #111; flex-wrap: wrap; }
#count { min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
#jump { max-width: 320px; }
#grid { display: none; position: fixed; inset: 0; background: rgba(15,15,15,.97);
  overflow-y: auto; padding: 16px; z-index: 10; }
#grid.open { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; align-content: start; }
#grid figure { margin: 0; cursor: pointer; }
#grid img { width: 100%; display: block; background: #fff; border: 2px solid transparent; }
#grid figure.current img { border-color: #8cc4ff; }
#grid figcaption { font-size: 12px; color: #bbb; margin-top: 4px; }
.help { color: #888; font-size: 12px; }
@media (max-width: 600px) { .help { display: none; } }
