:root {
  color-scheme: dark;
  --bg: #14141a;
  --panel: #1e1e26;
  --ink: #f9f6ed;
  --muted: #bab7c5;
  --acid: #e5fb65;
  --line: #3d3b46;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 12px; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
:is(button,a,input,select,summary):focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1200px, calc(100% - 56px)); margin-inline: auto; }
.masthead { position: relative; z-index: 5; min-height: 68px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; line-height: 1.2; }
.brand small, .foot small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.masthead > nav, .foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(16px, 3vw, 34px); font-size: 14px; }
.masthead > nav { margin-inline: auto; font-weight: 650; }
.masthead > nav a { display: inline-flex; align-items: center; gap: 3px; min-height: 44px; }
.masthead > nav a[aria-current], .trend-showroom-link:hover, .foot nav a:hover { color: var(--acid); }
.hrr-trend-actions { display: flex; align-items: center; margin-left: auto; }

.hero { padding: 22px 0 17px; }
.edition { margin: 0; color: var(--acid); font-size: 12px; font-weight: 700; letter-spacing: .09em; }
.hero h1 { margin: 5px 0 6px; font-size: clamp(25px, 4.6vw, 46px); line-height: 1.22; letter-spacing: -.04em; }
.lede { margin: 0; color: var(--muted); line-height: 1.65; font-size: 14px; }

.finds { padding-bottom: 42px; }
.views { display: flex; gap: 4px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #1b1a22; }
.view { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.view:hover { background: #2c2b34; color: var(--ink); }
.view[aria-pressed=true] { background: var(--acid); color: #1c2110; font-weight: 750; }
.view-count { font-size: 11px; opacity: .88; font-variant-numeric: tabular-nums; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 8px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-width: 0; width: min(360px, 100%); min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--muted); }
.search svg { flex: none; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search input { width: 100%; min-width: 0; background: transparent; color: var(--ink); border: 0; min-height: 40px; padding: 0; font-size: 16px; outline: none; }
.search input::placeholder { font-size: 13px; }
.search:focus-within { border-color: var(--acid); }
.archive-filter { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; }
.archive-filter select { min-width: 0; max-width: 200px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; min-height: 36px; padding: 4px 11px; font-size: 12px; }
.tag:hover, .tag[aria-pressed=true] { border-color: var(--acid); color: var(--acid); background: #323626; }
.tag-more { margin-top: 5px; font-size: 13px; color: var(--muted); }
.tag-more > summary { display: list-item; min-height: 35px; line-height: 35px; width: fit-content; }
#reset { min-height: 44px; border: 0; border-radius: 8px; padding: 0 9px; background: transparent; color: var(--acid); font-size: 13px; }
#count { color: var(--muted); font-size: 13px; margin: 12px 0 8px; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { display: block; min-width: 0; text-align: start; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); overflow: hidden; }
.card:hover { border-color: var(--acid); }
.card-visual { display: block; position: relative; aspect-ratio: 4 / 3.6; overflow: hidden; background: #2b2933; }
.card-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play-mark::before, .thumb-play::before { content: ''; width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.thumb-play::before { border-block-width: 3px; border-left-width: 5px; }
.play-mark, .stamp { position: absolute; background: #101014e6; color: #fff; }
.play-mark { inset: 8px auto auto 8px; display: grid; place-items: center; border-radius: 50%; width: 31px; height: 31px; font-size: 12px; }
.stamp { inset: auto 7px 7px auto; padding: 3px 6px; border-radius: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.card-copy { display: grid; gap: 3px; padding: 9px 10px; }
.card-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.card-note { color: var(--muted); font-size: 12px; }
.empty { grid-column: 1 / -1; margin: 0; padding: 24px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--panel); }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 0 28px; border-top: 1px solid var(--line); }

dialog {
  width: min(900px, calc(100vw - 40px)); height: min(840px, calc(100dvh - 30px));
  max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: #19191f; color: var(--ink); overflow: auto; overscroll-behavior: contain;
}
dialog[open] { display: grid; grid-template-rows: auto minmax(120px, 1fr) auto auto auto; }
dialog::backdrop { background: #060608ed; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 13px; }
.viewer-top h2 { margin: 2px 0 0; font-size: 19px; line-height: 1.2; }
#close, .viewer-controls button, .sound {
  min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink);
}
#close { width: 44px; flex: none; font-size: 25px; line-height: 1; }
.viewer-media { position: relative; display: grid; place-items: center; background: #0c0c11; min-width: 0; min-height: 0; overflow: hidden; }
.viewer-media :is(img, video) { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-media img { touch-action: pan-y pinch-zoom; user-select: none; }
.sound { position: absolute; inset: 8px 8px auto auto; padding: 0 10px; background: #17171dea; font-size: 13px; }
#viewer-note { margin: 0; min-height: 27px; padding: 6px 13px 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.viewer-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 6px 13px; }
.viewer-controls button { padding: 0 11px; font-size: 13px; }
.viewer-controls button[aria-disabled=true] { opacity: .43; cursor: default; }
.viewer-controls button:not([aria-disabled=true]):hover { border-color: var(--acid); }
#position { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.filmstrip { display: flex; min-width: 0; gap: 6px; padding: 4px 12px 9px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.thumb { flex: 0 0 56px; height: 52px; padding: 2px; position: relative; border: 2px solid transparent; border-radius: 7px; background: var(--panel); overflow: hidden; }
.thumb[aria-current=true] { border-color: var(--acid); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.thumb-play { position: absolute; bottom: 4px; right: 4px; display: grid; place-items: center; width: 17px; height: 16px; border-radius: 3px; background: #101014e6; color: #fff; }

@media (max-width: 920px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .masthead { min-height: 0; flex-wrap: wrap; gap: 2px 8px; padding-top: 5px; }
  .masthead > nav { order: 1; flex-basis: 100%; min-height: 42px; border-top: 1px solid var(--line); font-size: 13px; }
  .masthead > nav a { min-height: 40px; }
  .hero { padding: 13px 0 12px; }
  .hero h1 { font-size: clamp(22px, 6vw, 31px); }
  .lede { font-size: 13px; }
  .views { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .view { padding: 0 2px; gap: 4px; font-size: 13px; }
  .filter-bar { margin-top: 8px; gap: 5px; }
  .search { flex: 1 1 190px; }
  .archive-filter { flex: 1 1 40%; }
  .archive-filter select { flex: 1; }
  .tag { min-height: 40px; padding-inline: 8px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { border-radius: 8px; }
  .card-copy { padding: 7px 8px; }
  .card-copy strong { font-size: 13px; }
  .card-note { font-size: 11px; }
  dialog { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
}
@media (max-height: 420px) and (orientation: landscape) {
  dialog[open] { grid-template-rows: auto minmax(160px, 1fr) auto auto auto; }
  .thumb { height: 44px; flex-basis: 48px; }
}

.viewer-stage { position: relative; display: grid; min-width: 0; min-height: 0; overflow: hidden; }
.media-arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 56px; padding: 0; border: 1px solid #ffffff66; border-radius: 12px; background: #101014b8; color: #fff; box-shadow: 0 2px 12px #0003; touch-action: manipulation; }
.media-arrow::before { content: ''; width: 12px; height: 12px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.media-arrow-previous { left: 12px; }
.media-arrow-previous::before { transform: translateX(3px) rotate(-135deg); }
.media-arrow-next { right: 12px; }
.media-arrow-next::before { transform: translateX(-3px) rotate(45deg); }
.media-arrow[aria-disabled=true] { opacity: .25; cursor: default; }
@media (hover: hover) { .media-arrow:not([aria-disabled=true]):hover { background: #101014eb; border-color: var(--acid); color: var(--acid); } }
@media (max-width: 640px) { .media-arrow { width: 44px; height: 48px; border-radius: 10px; } .media-arrow-previous { left: 6px; } .media-arrow-next { right: 6px; } }
