:root {
  --ink: #163a3a;
  --ink-soft: #3d5c58;
  --paper: #f4efe4;
  --paper-2: #efe8d8;
  --card: #fffdf8;
  --line: #dccfb6;
  --accent: #e08a3a;
  --sea: #2f7d74;
  --warn: #b94040;
  --gold: #c9a227;
  --shadow: 0 18px 40px #163a3a14;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "PingFang SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 80% -10%, #f7d9a855, transparent 60%),
    linear-gradient(#f7f2e8, var(--paper) 280px);
}
a { color: var(--sea); }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.sky {
  position: fixed;
  inset: 0 0 auto;
  height: 220px;
  pointer-events: none;
  background: linear-gradient(#dceee8, transparent);
  z-index: -1;
}

.top, main, footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  padding: 42px 0 28px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 14px; align-items: center; }
.mark { width: 52px; height: 52px; display: block; }
.eyebrow {
  margin: 0 0 4px;
  letter-spacing: .18em;
  font-size: 11px;
  color: #6f857f;
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}
h1 { margin: 0; font-size: 42px; letter-spacing: .08em; font-weight: 700; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf1;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}
.live i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #8aa39c;
}
.live.ok i { background: var(--sea); box-shadow: 0 0 0 4px #2f7d7422; }
.live.warn i { background: var(--warn); }
.live.stale i { background: var(--gold); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0 22px;
}
.stats article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: var(--shadow);
  min-height: 132px;
  display: flex;
  flex-direction: column;
}
.stats span, .stats small, .note, .count, .search span, .meta, footer, .facts dt, .hover p {
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}
.stats span { color: #6f857f; font-size: 13px; }
.stats strong {
  font-size: 36px;
  margin: 10px 0 auto;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stats small { color: #8a9c96; font-size: 12px; }
.stats .warn strong { color: var(--warn); }

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, #refresh, .close {
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
  border: 1px solid var(--line);
  background: #fffaf1;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
}
.chip.on { background: var(--ink); color: #f4efe4; border-color: var(--ink); }
.search { display: grid; gap: 6px; font-size: 12px; color: #6f857f; }
.search input {
  width: min(260px, 42vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fffdf8;
  color: var(--ink);
}
.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #6f857f;
  font-size: 12px;
}
#refresh { padding: 8px 12px; }

.note, .count { color: #6f857f; font-size: 13px; line-height: 1.7; }
.note { margin: 4px 0 6px; }
.count { margin: 0 0 18px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px 18px;
  padding-bottom: 64px;
}
.card {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.account {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 650;
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}
.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: #e7efe8;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7f3ea;
}
.zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #163a3acc;
  color: #fff;
  font-size: 11px;
  opacity: 0;
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}
.thumb:hover .zoom, .thumb:focus-visible .zoom { opacity: 1; }
.caption {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--card);
  padding: 12px 12px 14px;
  display: grid;
  gap: 4px;
  min-height: 74px;
}
.caption time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.caption span {
  color: #7d908b;
  font-size: 12px;
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}

.ribbon {
  position: absolute;
  top: 0; right: 0;
  width: 108px; height: 108px;
  overflow: hidden;
  pointer-events: none;
}
.ribbon b {
  position: absolute;
  top: 22px; right: -36px;
  width: 150px;
  display: block;
  text-align: center;
  background: var(--warn);
  color: #fff;
  font: 600 11px/25px ui-sans-serif, "PingFang SC", sans-serif;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px #40192333;
}
.ribbon.suspicious b { background: #e7c25a; color: #513600; }
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #7d908b;
  padding: 48px 0;
  font-family: ui-sans-serif, "PingFang SC", sans-serif;
}

.hover {
  position: fixed;
  z-index: 30;
  width: min(720px, calc(100vw - 32px));
  padding: 8px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px #163a3a33;
  pointer-events: none;
}
.hover[hidden] { display: none; }
.hover-frame, .preview-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #eef3ea;
}
.hover img, .preview-frame img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.hover p {
  margin: 8px 6px 4px;
  font-size: 12px;
  color: #6f857f;
}

.preview {
  width: min(920px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 30px 80px #163a3a40;
}
.preview::backdrop { background: #163a3a66; backdrop-filter: blur(6px); }
.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}
.preview h2 { margin: 4px 0 0; font-size: 24px; }
.close {
  width: 36px; height: 36px;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 16px 0 0;
}
.facts dt { color: #6f857f; font-size: 12px; margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 40px;
  color: #7d908b;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
footer p { margin: 0; }

@media (max-width: 900px) {
  .toolbar, .stats, .facts, footer { grid-template-columns: 1fr 1fr; }
  .top { align-items: start; flex-wrap: wrap; }
  .meta { justify-content: flex-end; }
}
@media (max-width: 640px) {
  .top, main, footer { width: min(100% - 24px, 1180px); }
  h1 { font-size: 34px; }
  .stats, .toolbar, .facts, footer { grid-template-columns: 1fr; }
  .search input { width: 100%; }
  .zoom { display: none; }
  footer { flex-direction: column; }
}
