@font-face {
  font-family: "Zpix";
  src: url("https://cdn.jsdelivr.net/gh/SolidZORO/zpix-pixel-font/dist/Zpix.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #0b2f5c;
  --muted: #5876a4;
  --aqua: #2f7fe6;
  /* primary — now a truer blue */
  --aqua-deep: #1257c4;
  --aqua-soft: #aac6f6;
  --aqua-glow: rgba(55, 130, 240, .5);
  --gem: #ffcf3a;

  --edge: rgba(255, 255, 255, .85);
  --shadow: rgba(16, 64, 130, .2);

  --disp: "Zpix", "PingFang SC", "Microsoft YaHei", monospace;
  /* pixel chrome */
  --body: 'Hanken Grotesk', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: "Zpix", ui-monospace, SFMono-Regular, Menlo, monospace;
  --qq: "SimSun", "宋体", serif;
  --px: -.4px;
  /* tighten the wide pixel-Latin kerning */
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0
}

body {
  color: var(--ink);
  font: 14px/1.5 var(--body);
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(150, 205, 255, .55), transparent 60%),
    linear-gradient(180deg, #6fa8ee 0%, #9cc4f5 26%, #c8dcfb 58%, #e9f1fd 100%);
  background-attachment: fixed;
}

/* dreamy atmosphere — soft light orbs floating behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(360px 360px at 12% 16%, rgba(255, 255, 255, .9), transparent 62%),
    radial-gradient(300px 300px at 82% 8%, rgba(150, 200, 255, .72), transparent 60%),
    radial-gradient(420px 420px at 70% 78%, rgba(150, 195, 255, .5), transparent 62%),
    radial-gradient(260px 260px at 30% 88%, rgba(255, 255, 255, .7), transparent 60%);
  filter: blur(6px);
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(0, -18px, 0) scale(1.04);
  }
}

/* ---------- header: ONE seamless frosted deck (title gradients into nav) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, .62) 0%,
      rgba(196, 220, 250, .5) 42%,
      rgba(206, 226, 250, .32) 100%);
  backdrop-filter: blur(20px) saturate(1.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
  box-shadow: 0 10px 26px rgba(18, 70, 135, .14);
  /* soft glow, NO hard line */
}

.topbar .gradient {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 22px 8px;
  background: none;
  border: none;
}

.brand {
  display: flex;
  align-items: center;
}

.brand h1 {
  margin: 0;
  font: 400 22px/1.2 var(--disp);
  letter-spacing: var(--px);
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}

.brand h1::before {
  content: "";
  display: inline-block;
  width: 21px;
  height: 18px;
  margin-right: 9px;
  vertical-align: -3px;
  background: url("assets/huangzuan_plain.png") center/contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 2px rgba(180, 140, 0, .4));
}

.sub {
  display: none;
}

/* primary site nav — Archive · QZone · About */
.topnav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.topnav a,
.topnav button {
  font: 400 14px/1 var(--disp);
  letter-spacing: var(--px);
  cursor: pointer;
  text-decoration: none;
  color: var(--aqua-deep);
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .5) 48%, rgba(210, 230, 250, .35) 52%, rgba(172, 206, 246, .55) 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -6px 11px rgba(110, 160, 225, .26), 0 2px 5px var(--shadow);
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
}

.topnav a:hover,
.topnav button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px var(--shadow), 0 0 0 2px rgba(110, 175, 250, .34);
}

.topnav a.on {
  color: #fff;
  border-color: rgba(255, 255, 255, .9);
  background: linear-gradient(180deg, rgba(255, 255, 255, .8) 0%, rgba(110, 175, 250, .94) 46%, rgba(45, 130, 235, .97) 54%, rgba(16, 90, 205, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 9px var(--aqua-glow), 0 0 14px var(--aqua-glow);
  text-shadow: 0 1px 1px rgba(0, 40, 95, .4);
}

.search {
  display: flex;
  gap: 9px;
  align-items: center;
}

.search input {
  width: min(34vw, 300px);
  padding: 6px 13px;
  font: 13px/1 var(--body);
  letter-spacing: -.1px;
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(255, 255, 255, .6);
  box-shadow: inset 0 2px 5px rgba(60, 120, 175, .22), inset 0 1px 0 rgba(255, 255, 255, .7);
  outline: none;
  transition: box-shadow .15s, background .15s;
}

.search input::placeholder {
  color: #88a6c8;
}

.search input:focus {
  background: rgba(255, 255, 255, .88);
  box-shadow: inset 0 2px 5px rgba(60, 120, 175, .15), 0 0 0 3px rgba(60, 140, 240, .3);
}

/* glossy gel controls (header + filters), pixel-faced */
#random,
.chip,
.sort button,
.filter-toggle {
  font-family: var(--disp);
  font-weight: 400;
  letter-spacing: var(--px);
  cursor: pointer;
  color: var(--aqua-deep);
  border: 1px solid var(--edge);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .5) 48%,
      rgba(210, 230, 250, .35) 52%, rgba(172, 206, 246, .55) 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -6px 11px rgba(110, 160, 225, .26), 0 2px 5px var(--shadow);
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
}

#random:hover,
.chip:hover,
.sort button:hover,
.filter-toggle:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px var(--shadow), 0 0 0 2px rgba(110, 175, 250, .34);
}

.chip.on,
.sort button.on,
.filter-toggle.on {
  color: #fff;
  border-color: rgba(255, 255, 255, .9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .8) 0%, rgba(110, 175, 250, .94) 46%,
      rgba(45, 130, 235, .97) 54%, rgba(16, 90, 205, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 9px var(--aqua-glow), 0 0 14px var(--aqua-glow);
  text-shadow: 0 1px 1px rgba(0, 40, 95, .4);
}

#random {
  width: 28px;
  height: 28px;
  font-size: 12px;
  padding: 0;
}

/* ---------- filters (transparent — part of the same deck) ---------- */
.filters {
  padding: 4px 22px 14px;
  background: none;
  border: none;
  animation: deck-in .5s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes deck-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.toolrow {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.toolrow .types {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
  order: -1;
  /* keep type tabs on the left of the row (search/toggle come first in DOM) */
}

.toolrow .search {
  margin-left: auto;
  flex: 0 0 auto;
}

/* filter drawer toggle — mobile only (hidden on desktop) */
.filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
}

.filter-toggle .ft-caret {
  font-size: 11px;
  line-height: 1;
  transition: transform .2s ease;
}

.filter-toggle[aria-expanded="true"] .ft-caret {
  transform: rotate(180deg);
}

.facet {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

.facet-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 9px;
  align-items: center;
}

.types {
  margin-bottom: 2px;
}

.chip {
  padding: 5px 13px;
  font-size: 13px;
  white-space: nowrap;
}

.chip .n {
  font: 400 11px/1 var(--mono);
  letter-spacing: 0;
  margin-left: 6px;
  opacity: .65;
}

.chip.on .n {
  opacity: .85;
}

.types .chip {
  padding: 6px 15px;
  font-size: 13.5px;
}

/* hue swatches = glossy water-drops */
.hues {
  gap: 6px;
}

.hues .lbl {
  font: 400 12px/1 var(--disp);
  letter-spacing: var(--px);
  color: var(--muted);
  margin-right: 3px;
}

.hues .sw {
  width: 25px;
  height: 25px;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .85), inset 0 -3px 5px rgba(0, 0, 0, .22),
    0 2px 4px var(--shadow);
  position: relative;
  transition: transform .12s, box-shadow .15s;
}

.hues .sw::after {
  content: "";
  position: absolute;
  left: 22%;
  top: 13%;
  width: 42%;
  height: 32%;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
}

.hues .sw:hover {
  transform: translateY(-1px) scale(1.08);
}

.hues .sw.on {
  transform: scale(1.16);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .85), inset 0 -3px 5px rgba(0, 0, 0, .22),
    0 0 0 2px #fff, 0 0 0 4px var(--aqua), 0 0 12px var(--aqua-glow);
}

.years .chip {
  font-size: 12px;
}

.sort {
  margin-left: auto;
  gap: 5px;
}

.sort button {
  padding: 5px 13px;
  font-size: 12.5px;
}

.sort .anim {
  font: 400 12.5px/1 var(--disp);
  letter-spacing: var(--px);
  color: var(--muted);
  display: flex;
  gap: 5px;
  align-items: center;
  margin-left: 4px;
}

.sort .anim input {
  accent-color: var(--aqua);
}

.active-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.active-bar:empty {
  display: none;
}

.tag-x {
  font: 500 12px/1 var(--body);
  letter-spacing: -.1px;
  cursor: pointer;
  color: var(--aqua-deep);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 8px;
  padding: 4px 11px;
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px var(--shadow);
}

.tag-x b {
  color: var(--ink);
  font-weight: 700;
}

.tag-x:hover {
  color: #c0392b;
  border-color: #f2b8b0;
  background: rgba(255, 245, 244, .8);
}

/* ---------- grid of glass cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
  padding: 20px 22px 70px;
  align-content: start;
}

.cell {
  position: relative;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(220, 236, 252, .58));
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(22, 80, 140, .14);
  overflow: hidden;
  transition: transform .14s, box-shadow .16s, border-color .16s;
  content-visibility: auto;
}

.cell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 45%;
  background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.cell:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 175, 250, .9);
  box-shadow: inset 0 1px 0 #fff, 0 12px 26px rgba(22, 100, 175, .3), 0 0 0 1px var(--aqua),
    0 0 18px var(--aqua-glow);
  z-index: 1;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
}

.cell-pixel img {
  image-rendering: pixelated;
  padding: 8px;
}

.cell-photo img {
  image-rendering: auto;
  padding: 5px;
}

.noimg {
  color: #9bb6d8;
  font: 400 11px/1 var(--mono);
}

.cell .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 9px 6px;
  background: linear-gradient(180deg, transparent, rgba(8, 40, 80, .85));
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .14s, transform .14s;
  pointer-events: none;
}

.cell:hover .cap {
  opacity: 1;
  transform: none;
}

.cell .cap .nm {
  font: 400 12px/1.3 var(--disp);
  letter-spacing: var(--px);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell .cap .id {
  font: 400 10px/1.3 var(--mono);
  letter-spacing: 0;
  opacity: .82;
}

.cell .dots {
  position: absolute;
  top: 7px;
  left: 7px;
  display: flex;
  gap: 2px;
  z-index: 1;
}

.cell .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9), inset 0 1px 1px rgba(255, 255, 255, .7);
}

.cell .anim-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  font: 400 8.5px/1 var(--mono);
  letter-spacing: 0;
  background: rgba(8, 40, 80, .62);
  color: #fff;
  border-radius: 5px;
  padding: 2px 4px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 70px 20px;
  font: 400 15px/1.5 var(--disp);
  letter-spacing: var(--px);
}

#sentinel {
  height: 1px;
}

/* ---------- detail: floating frosted-glass window ---------- */
.detail[hidden] {
  display: none;
}

.detail {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.detail-scrim {
  position: absolute;
  inset: 0;
  background: rgba(16, 60, 115, .38);
  backdrop-filter: blur(4px);
}

.detail-card {
  position: relative;
  display: flex;
  max-width: 880px;
  width: 100%;
  max-height: 88vh;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .66), rgba(208, 228, 252, .5));
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 #fff, 0 36px 90px rgba(12, 55, 110, .42), 0 0 0 1px rgba(110, 165, 220, .25);
  animation: pop .3s cubic-bezier(.2, .9, .25, 1) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.detail-x {
  position: absolute;
  top: 12px;
  right: 13px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--aqua-deep);
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(186, 214, 248, .7));
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px var(--shadow);
}

.detail-x:hover {
  box-shadow: inset 0 1px 0 #fff, 0 0 0 2px rgba(110, 175, 250, .4);
}

.detail-stage {
  flex: 1 1 54%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .5), transparent 70%),
    linear-gradient(180deg, rgba(150, 200, 250, .26), rgba(150, 195, 255, .18));
}

.detail-stage img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(16, 64, 120, .3));
}

#d-img.pixel {
  image-rendering: pixelated;
}

.detail-meta {
  flex: 0 0 340px;
  padding: 30px 28px;
  overflow: auto;
  border-left: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .1));
}

.detail-meta h2 {
  margin: 0 0 8px;
  font: 400 24px/1.25 var(--disp);
  letter-spacing: var(--px);
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

/* item number + type, sitting together under the name */
.d-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.d-id {
  font: 400 13px/1 var(--mono);
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}

/* desktop: name stacked over its #id/type line (default block flow) */
.d-head {
  margin: 0;
}

/* recessed glass field-cards (BannerDepot DNA, glassified) */
.fields {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 20px;
}

.field {
  flex: 1 1 calc(50% - 9px);
  min-width: 92px;
}

.field.wide {
  flex-basis: 100%;
}

.field .fl {
  display: block;
  font: 400 10.5px/1 var(--disp);
  letter-spacing: var(--px);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px 2px;
}

.field .fv {
  display: block;
  font: 400 13px/1.35 var(--mono);
  letter-spacing: 0;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 2px 4px rgba(60, 120, 165, .2), inset 0 -1px 0 rgba(255, 255, 255, .6);
}

.field.wide .fv {
  background: none;
  border: none;
  box-shadow: none;
  padding: 3px 0 0;
}

.huelist {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.huechip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 12.5px/1 var(--body);
  letter-spacing: -.1px;
  color: var(--ink);
}

.huechip .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), 0 0 0 1px rgba(0, 0, 0, .1);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  font: 500 12px/1 var(--body);
  letter-spacing: -.1px;
  color: var(--aqua-deep);
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px var(--shadow);
}

/* the item's type — a light pill, pixel-faced to set it apart from tags */
.pill-type {
  font-family: var(--disp);
  letter-spacing: var(--px);
  color: var(--aqua-deep);
  background: rgba(173, 205, 250, .4);
  border-color: rgba(255, 255, 255, .85);
}

.hz {
  height: 15px;
  width: auto;
  vertical-align: -3px;
  margin-left: 2px;
  image-rendering: pixelated;
}

.d-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.d-actions a,
.d-actions button {
  font: 400 13px/1 var(--disp);
  letter-spacing: var(--px);
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--edge);
}

.d-actions a {
  color: #fff;
  border-color: rgba(255, 255, 255, .9);
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(45, 130, 235, .97) 55%, rgba(16, 90, 205, 1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 9px var(--aqua-glow);
  text-shadow: 0 1px 1px rgba(0, 40, 95, .4);
}

.d-actions a:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 16px var(--aqua-glow);
}

.d-actions button {
  color: var(--aqua-deep);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(186, 214, 248, .65));
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px var(--shadow);
}

.d-actions button:hover {
  box-shadow: inset 0 1px 0 #fff, 0 0 0 2px rgba(110, 175, 250, .4);
}

/* ---------- about page ---------- */
.about-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 22px 80px;
}

.about-card {
  border-radius: 13px;
  padding: 34px 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .66), rgba(208, 228, 252, .5));
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px rgba(12, 55, 110, .28);
}

.about-card h2 {
  font: 400 22px/1.3 var(--disp);
  letter-spacing: var(--px);
  color: var(--ink);
  margin: 26px 0 10px;
}

.about-card h2:first-child,
.about-card .zh>h2:first-child,
.about-card .en>h2:first-child {
  margin-top: 0;
}

.about-card p,
.about-card li {
  /* 楷 prose, same voice as the 日志 body on the dress-up page */
  font: 400 16px/1.95 "LXGW ZhenKai GB", "Kaiti SC", "KaiTi", "楷体", Georgia, serif;
  color: #2a4a72;
}

/* inline links as little gel pills */
.about-card a {
  color: var(--aqua-deep);
  text-decoration: none;
  padding: 0 8px 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(186, 214, 248, .55));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px var(--shadow);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: box-shadow .15s, background .15s;
}

.about-card a:hover {
  background: linear-gradient(180deg, #fff, rgba(170, 205, 248, .78));
  box-shadow: inset 0 1px 0 #fff, 0 2px 8px var(--aqua-glow), 0 0 0 2px rgba(110, 175, 250, .3);
}

/* .about-card .lead {
  font-size: 18.5px;
} */

.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.about-stats .stat {
  flex: 1 1 120px;
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 2px 4px rgba(60, 120, 165, .15);
}

.about-stats .num {
  display: block;
  font: 400 24px/1 var(--disp);
  letter-spacing: var(--px);
  color: var(--aqua-deep);
}

.about-stats .lab {
  display: block;
  font: 400 11px/1.4 var(--disp);
  letter-spacing: var(--px);
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

::-webkit-scrollbar {
  width: 13px;
  height: 13px;
}

::-webkit-scrollbar-track {
  background: rgba(228, 240, 253, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), inset 0 0 6px rgba(60, 120, 175, .28);
}

::-webkit-scrollbar-thumb {
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 0 2px rgba(255, 255, 255, .85);
  min-height: 36px;
  min-width: 36px;
}

::-webkit-scrollbar-thumb:vertical {
  background: linear-gradient(90deg, rgba(255, 255, 255, .95) 0%, rgba(186, 215, 250, .95) 46%, rgba(150, 195, 247, .95) 54%, rgba(120, 172, 240, .95) 100%);
}

::-webkit-scrollbar-thumb:horizontal {
  background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(186, 215, 250, .95) 46%, rgba(150, 195, 247, .95) 54%, rgba(120, 172, 240, .95) 100%);
}

::-webkit-scrollbar-thumb:vertical:hover,
::-webkit-scrollbar-thumb:vertical:active {
  background: linear-gradient(90deg, rgba(255, 255, 255, .85) 0%, rgba(110, 175, 250, .95) 46%, rgba(45, 130, 235, .97) 54%, rgba(16, 90, 205, 1) 100%);
}

::-webkit-scrollbar-thumb:horizontal:hover,
::-webkit-scrollbar-thumb:horizontal:active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .85) 0%, rgba(110, 175, 250, .95) 46%, rgba(45, 130, 235, .97) 54%, rgba(16, 90, 205, 1) 100%);
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  border-color: #fff;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox fallback — must stay scoped: scrollbar-color disables ::-webkit-scrollbar in Chromium */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-color: #8ab2ef rgba(228, 240, 253, .7);
  }
}

/* ---------- museum page: frosted deck stays put; only the collection scrolls ---------- */
body.museum {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.museum .topbar {
  flex: 0 0 auto;
}

.scrollzone {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateZ(0);
  will-change: scroll-position;
}



body.museum-cursor,
body.museum-cursor * {
  cursor: url("assets/blank.png") 0 0, none !important;
}

#museumCursor {
  position: fixed;
  left: 0;
  top: 0;
  display: none;
  pointer-events: none;
  z-index: 99999;
  image-rendering: pixelated;
  will-change: transform;
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) and (min-width: 641px) {
  .filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
  }

  .toolrow .search input {
    width: clamp(140px, 26vw, 300px);
  }

  .toolrow,
  .facet-row {
    display: contents;
  }

  .toolrow .types {
    order: 1;
    flex: 1 1 100%;
  }

  .facet-row .hues {
    order: 2;
  }

  .toolrow .search {
    order: 3;
    margin-left: auto;
  }

  .facet-row .years {
    order: 4;
  }

  .facet-row .sort {
    order: 5;
  }

  .active-bar {
    order: 6;
    flex: 1 1 100%;
    margin-top: 0;
  }
}

@media (max-width: 760px) and (min-width: 641px) {
  .hues .lbl {
    display: none;
  }
}

@media (max-width: 640px) {
  .detail {
    padding: 12px;
  }

  .detail-card {
    flex-direction: column;
    max-height: 92vh;
  }

  .detail-stage {
    padding: 18px;
  }

  .detail-stage img {
    max-height: 42vh;
  }

  .detail-meta {
    flex: auto;
    padding: 20px 22px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, .55);
  }

  /* name on the left, #id + type tucked into the top-right corner (saves a line) */
  .d-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .d-head h2 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .d-head .d-meta {
    margin: 0;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  /* tighter header so the grid gets the screen — brand + nav share ONE row
     (nav hugs the top right, like the QZone page; keep in sync with
     qzone-library.css's mobile topbar) */
  .topbar .gradient {
    gap: 6px;
    padding: 8px 8px 5px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .brand h1::before {
    width: 17px;
    height: 15px;
    margin-right: 5px;
  }

  .topnav {
    gap: 3px;
  }

  .topnav a,
  .topnav button {
    padding: 6px 7px;
    font-size: 11px;
  }

  #lang {
    min-width: 30px;
  }

  .filters {
    padding: 4px 14px 11px;
  }

  /* row 1: search + Filters toggle; type tabs become a horizontal scroll strip */
  .toolrow {
    gap: 8px;
    align-items: center;
  }

  .toolrow .search {
    order: 1;
    margin-left: 0;
    flex: 1 1 auto;
    min-width: 130px;
    max-width: 240px;
  }

  .toolrow .search input {
    width: 100%;
    min-width: 0;
  }

  .filter-toggle {
    display: inline-flex;
    order: 1;
    flex: 0 0 auto;
    margin-left: auto;
    /* hug the right edge so the search bar stays compact */
  }

  /* the "色 / Color" label is redundant next to the swatches on mobile */
  .hues .lbl {
    display: none;
  }

  .toolrow .types {
    order: 2;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin: 2px -14px 0;
    padding-left: 14px;
    padding-right: 14px;
    /* bleed to screen edges so chips can scroll fully */
  }

  .toolrow .types::-webkit-scrollbar {
    display: none;
  }

  .toolrow .types .chip {
    flex: 0 0 auto;
  }

  /* fade the edge(s) that have more chips hidden off-screen — a hint to swipe */
  .toolrow .types.fade-r {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
  }

  .toolrow .types.fade-l {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px);
    mask-image: linear-gradient(90deg, transparent, #000 30px);
  }

  .toolrow .types.fade-l.fade-r {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
  }

  /* secondary facets collapse behind the toggle */
  #facetExtra {
    display: none;
    margin-top: 12px;
  }

  #facetExtra.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  #facetExtra .sort {
    margin-left: 0;
    flex-wrap: wrap;
  }

  /* denser grid, less edge padding */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    padding: 14px 14px 70px;
  }

  /* smoother scrolling: drop fixed/animated background repaints on mobile */
  body {
    background-attachment: scroll;
  }

  body::before {
    animation: none;
    filter: blur(4px);
  }
}

.about-card code {
  font: 400 12.5px/1 var(--mono);
  color: var(--aqua-deep);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 5px;
  padding: 2px 6px;
}

.about-card ul {
  padding-left: 20px;
}

.about-card li {
  margin: 5px 0;
}

.about-go {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.about-go .go {
  font: 400 13px/1 var(--disp);
  letter-spacing: var(--px);
  text-decoration: none;
  color: var(--aqua-deep);
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(186, 214, 248, .62));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px var(--shadow);
  transition: transform .12s, box-shadow .15s;
}

.about-go .go:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px var(--aqua-glow);
}

.about-card .fine {
  font-size: 12.5px;
  color: var(--muted);
}

/* about-page language toggle: show only the active language */
body.lang-zh .en,
body.lang-en .zh {
  display: none;
}