html,
body {
  min-height: 100%;
}
body {
  background-color: #ffffff;
  background-image: radial-gradient(#a8b4c4 0.7px, transparent 0.8px);
  background-size: 14px 14px;
  background-attachment: fixed;
}
html.dark body {
  background-color: #09090b;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.7px, transparent 0.8px);
}
.bar {
  grid-template-columns: 1fr minmax(200px, 380px) 1fr;
}
@media (max-width: 800px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar input[type="search"] {
    grid-column: 1 / -1;
    order: 3;
  }
}
.wrap { overflow: visible; }
th {
  background: #ffffff;
}
.dark th {
  background: #09090b;
}
td {
  background: transparent;
}
td {
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.4rem 0.5rem;
}
.dark td {
  border-bottom-color: #27272a;
}
tr:hover td { background: rgba(15, 23, 42, 0.04); }
.dark tr:hover td { background: rgba(255, 255, 255, 0.04); }
.cover {
  width: 196px;
  overflow: visible;
  position: relative;
}
.cover-hit {
  position: relative;
  display: inline-block;
  z-index: 1;
}
.cover-hit.open {
  z-index: 50;
}
.cover-hit .cover-img {
  cursor: pointer;
}
.cover-img,
.no-cover {
  position: relative;
  z-index: 2;
  width: 176px;
  height: 176px;
  max-width: none;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
  display: block;
}
.dark .cover-img,
.dark .no-cover { background: #27272a; }
.cover-tip {
  display: none;
  position: absolute;
  z-index: 1;
  top: -8px;
  left: -8px;
  pointer-events: none;
  filter:
    drop-shadow(0 2px 4px rgba(15, 23, 42, 0.2))
    drop-shadow(0 12px 24px rgba(15, 23, 42, 0.22))
    drop-shadow(0 28px 56px rgba(15, 23, 42, 0.28));
}
.dark .cover-tip {
  filter:
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
    drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5))
    drop-shadow(0 32px 64px rgba(0, 0, 0, 0.45));
}
.cover-hit.open .cover-tip {
  display: block;
  width: max-content;
}
.cover-tip-body {
  --cap-w: 192px;
  --cap-h: 184px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
  background: #fff;
  clip-path: polygon(
    0 0,
    var(--cap-w) 0,
    var(--cap-w) var(--cap-h),
    100% var(--cap-h),
    100% 100%,
    0 100%
  );
}
.dark .cover-tip-body {
  background: #09090b;
}
.cover-hit.open.tip-up .cover-tip {
  top: auto;
  bottom: -8px;
}
.cover-hit.open.tip-up .cover-tip-body {
  flex-direction: column-reverse;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--cap-h)),
    var(--cap-w) calc(100% - var(--cap-h)),
    var(--cap-w) 100%,
    0 100%
  );
}
.cover-tip-pad {
  width: 176px;
  height: 176px;
  flex-shrink: 0;
  pointer-events: none;
}
.gallery {
  display: flex;
  gap: 8px;
  max-width: min(72vw, 980px);
  overflow-x: auto;
  width: max-content;
  pointer-events: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}
.dark .gallery {
  scrollbar-color: rgba(161, 161, 170, 0.5) transparent;
}
.gallery::-webkit-scrollbar {
  height: 6px;
}
.gallery::-webkit-scrollbar-track {
  background: transparent;
}
.gallery::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}
.dark .gallery::-webkit-scrollbar-thumb {
  background: rgba(161, 161, 170, 0.5);
}
.gallery::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}
.shot {
  position: relative;
  flex: 0 0 auto;
  height: 140px;
  min-width: 90px;
  border-radius: 4px;
  background: #f1f5f9;
  overflow: hidden;
}
.dark .shot { background: #27272a; }
.shot img {
  height: 140px;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.shot:not(.loading) img { opacity: 1; }
.shot.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 2px solid #94a3b8;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.dark .shot.loading::after { border-color: #71717a; border-top-color: transparent; }
@keyframes spin {
  to { transform: rotate(360deg); }
}
.no-cover {
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 0.75rem;
}
.title-cell {
  max-width: 560px;
  width: 480px;
}
.title-line {
  display: block;
}
.title-cell a {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.title-cell a:hover { color: #0284c7; }
.title-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.tag {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 1px;
}
.dark .tag { background: #27272a; color: #a1a1aa; }
.date {
  white-space: nowrap;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.dark .date { color: #a1a1aa; }
.cats { width: 42%; }
.pill,
.origin-pill {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
}
.dark .pill,
.dark .origin-pill {
  background: #27272a;
  color: #d4d4d8;
}
.pill-unknown {
  background: #fff3bf;
  color: #7a5b00;
}
.dark .pill-unknown {
  background: #3a3214;
  color: #f0d24a;
}
.origin { white-space: nowrap; }
.origin-pill { margin: 0; font-weight: 650; }
.origin-fff { background: #f3e6d0; color: #8a5a18; }
.origin-iop { background: #d7e8f6; color: #1d4f78; }
.origin-f95 { background: #f3d6e2; color: #8a2f55; }
.dark .origin-fff { background: #2b2418; color: #d7a15f; }
.dark .origin-iop { background: #1a2838; color: #7eb6e6; }
.dark .origin-f95 { background: #2a1a24; color: #e89ab8; }
.dl {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  white-space: normal;
}
.dl a.btn,
.dl .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 4px 4px 0;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  vertical-align: middle;
}
.dark .dl a.btn,
.dark .dl .btn {
  border-color: #3f3f46;
  background: #18181b;
}
.dl a.btn:last-child,
.dl .btn:last-child { margin-right: 0; }
.dl a.btn img,
.dl a.btn svg,
.dl .btn img,
.dl .btn svg {
  width: 16px;
  height: 16px;
  max-width: none;
  display: block;
}
.btn-none {
  color: #dc2626;
  cursor: default;
  pointer-events: none;
  opacity: 0.7;
}
.empty td {
  text-align: center;
  color: #64748b;
  padding: 2rem 0.5rem;
}
tr.hidden { display: none; }
code { color: #0284c7; font-size: 0.85em; }
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
}
.pager button {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 0.75rem;
  cursor: pointer;
}
.dark .pager button {
  border-color: #3f3f46;
  background: rgba(24, 24, 27, 0.9);
  color: #d4d4d8;
}
.pager button:hover:not(:disabled) {
  border-color: #0ea5e9;
  color: #0284c7;
}
.pager button.is-current {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
