@font-face {
  font-family: 'SanJiNengLiangHei';
  src: url('/static/fonts/SanJiNengLiangHeiJianTi-2.woff2') format('woff2'),
       url('/static/fonts/SanJiNengLiangHeiJianTi-2.ttf') format('truetype');
  font-weight: 400 900;
  font-display: block;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: 'SanJiNengLiangHei', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.viewer-open {
  overflow: hidden;
}

body.age-gate-open {
  overflow: hidden;
}

html.age-ok .age-gate {
  display: none !important;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  animation: gate-fade-in .32s var(--ease) both;
}

.age-gate.is-leaving {
  opacity: 0;
  transition: opacity .3s var(--ease);
}

@keyframes gate-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.age-gate-card {
  width: min(450px, 100%);
  padding: 36px 32px 28px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(255, 255, 255, .78);
  background:
    radial-gradient(circle at 84% 8%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .78));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .14);
  color: var(--text);
  text-align: center;
  animation: gate-card-in .55s var(--ease-spring) both;
}

@keyframes gate-card-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.age-gate-badge {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .01em;
}

.age-gate-card h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.age-gate-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 24px;
}

.age-btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

.age-btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 28%, transparent);
}

.age-btn-primary:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 88%, #fff);
}

.age-btn-primary:active {
  transform: scale(.985);
}

.age-btn-ghost {
  color: var(--muted);
  background: rgba(15, 23, 42, .05);
}

.age-btn-ghost:hover {
  color: var(--text);
  background: rgba(15, 23, 42, .09);
}

.age-gate-note {
  display: block;
  margin-top: 14px;
  color: color-mix(in srgb, var(--muted) 74%, transparent);
  font-size: 11.5px;
}

@media (max-width: 640px) {
  .age-gate-card {
    padding: 30px 22px 24px;
  }

  .age-gate-card h1 {
    font-size: 24px;
  }

  .age-gate-badge {
    width: 56px;
    height: 56px;
    font-size: 18px;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #fff;
  background: var(--accent);
}

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

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .55;
  animation: ambient-float 18s var(--ease) infinite alternate;
}

.orb-a {
  top: -18vw;
  right: -12vw;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%);
}

.orb-b {
  bottom: -24vw;
  left: -16vw;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgba(244, 114, 182, .12), transparent 68%);
  animation-delay: -8s;
}

@keyframes ambient-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2vw, 3vw, 0) scale(1.08); }
}

.page-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 16px 0;
  display: flex;
  flex-direction: column;
}

/* ---------------- Header ---------------- */

.app-header {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .07);
  animation: header-in .65s var(--ease-spring) both;
}

@keyframes header-in {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  padding: 8px 15px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  transition: color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(15, 23, 42, .045);
}

.nav-link:active {
  transform: scale(.96);
}

.nav-link.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.search-box {
  width: 238px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(248, 250, 252, .8);
  transition: border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease), width .32s var(--ease-spring);
}

.search-box:focus-within {
  width: 282px;
  border-color: color-mix(in srgb, var(--accent) 45%, #fff);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-box > svg {
  width: 17px;
  height: 17px;
  color: #94a3b8;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #9aa8bb;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, .06);
}

.search-clear svg {
  width: 12px;
  height: 12px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(248, 250, 252, .72);
  transition: color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease), border-color .22s var(--ease);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.icon-button:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, #fff);
  background: #fff;
}

.icon-button:active {
  transform: scale(.94);
}

.expand-toggle {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  color: var(--muted);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(248, 250, 252, .72);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}

.expand-toggle svg {
  width: 17px;
  height: 17px;
}

.expand-toggle:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, #fff);
  background: #fff;
}

.expand-toggle.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, #fff);
  background: color-mix(in srgb, var(--accent) 9%, #fff);
}

.expand-toggle:active {
  transform: scale(.96);
}

.mode-toggle {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--muted);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(248, 250, 252, .72);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}

.mode-toggle svg {
  width: 17px;
  height: 17px;
}

.mode-toggle-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background .22s var(--ease), box-shadow .22s var(--ease);
}

.mode-toggle:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, #fff);
  background: #fff;
}

.mode-toggle.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, #fff);
  background: color-mix(in srgb, var(--accent) 9%, #fff);
}

.mode-toggle.is-on .mode-toggle-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.mode-toggle.is-locked {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.mode-toggle.is-locked:hover {
  color: var(--accent);
}

.mode-toggle:active {
  transform: scale(.96);
}

.mode-toggle:disabled {
  opacity: .6;
  cursor: default;
}

@media (max-width: 560px) {
  .expand-toggle {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .expand-toggle span {
    display: none;
  }

  .mode-toggle {
    width: 40px;
    padding: 0;
    justify-content: center;
    gap: 5px;
  }

  .admin-link {
    display: none;
  }
}

/* ---------------- Page / Hero ---------------- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 26px;
  min-height: 310px;
  padding: 44px 46px;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(255, 255, 255, .74);
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 36%),
    radial-gradient(circle at 68% 108%, rgba(244, 114, 182, .1), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .64));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 44px rgba(15, 23, 42, .065);
  animation: hero-in .8s var(--ease-spring) both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px) scale(.992); }
  to { opacity: 1; transform: none; }
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.hero-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, #fff);
}

.hero-badge svg {
  width: 15px;
  height: 15px;
}

.hero h1 {
  max-width: 720px;
  color: var(--text);
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.hero-copy > p {
  max-width: 600px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.8;
}

.announcement {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 9px 15px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .045);
  color: var(--text);
  font-size: 13.5px;
}

.announcement-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}

.hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  min-width: 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  padding: 17px 12px 15px;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .74);
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

.stat strong {
  display: block;
  color: var(--accent);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.03em;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-decoration {
  position: relative;
  height: 116px;
  opacity: .9;
}

.frame {
  position: absolute;
  display: block;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: rgba(255, 255, 255, .26);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .04);
}

.frame-a {
  inset: 10px 24% 0 8%;
  transform: rotate(-7deg);
}

.frame-b {
  inset: 20px 4% 4px 46%;
  transform: rotate(6deg);
  border-color: rgba(244, 114, 182, .18);
}

.frame-c {
  width: 56px;
  height: 56px;
  right: 18%;
  top: 8px;
  border-radius: 50%;
  border-color: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ---------------- Library ---------------- */

.library {
  padding: 22px 24px 26px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .56);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(15, 23, 42, .055);
  animation: library-in .85s var(--ease-spring) both;
  animation-delay: .08s;
}

@keyframes library-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(226, 232, 240, .76);
}

.library-body {
  transition: opacity .2s var(--ease), transform .22s var(--ease);
}

.library-body.is-switching {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb button {
  max-width: 240px;
  padding: 5px 8px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  border-radius: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.breadcrumb button:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.breadcrumb .crumb-sep {
  color: #cbd5e1;
  font-size: 13px;
}

.crumb-current {
  color: var(--text);
  font-weight: 800;
  padding: 5px 8px;
}

.library-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.sort-control {
  position: relative;
  flex: 0 0 auto;
}

.sort-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 11px 0 13px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.sort-trigger:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, #fff);
  background: #fff;
}

.sort-trigger:active {
  transform: scale(.97);
}

.sort-control.is-open .sort-trigger {
  border-color: color-mix(in srgb, var(--accent) 46%, #fff);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent);
}

.sort-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sort-value {
  min-width: 56px;
  text-align: left;
}

.sort-caret {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform .3s var(--ease-spring);
}

.sort-control.is-open .sort-caret {
  transform: rotate(180deg);
}

.sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 158px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.96);
  transform-origin: top right;
  transition: opacity .2s var(--ease), transform .3s var(--ease-spring), visibility .2s var(--ease);
}

.sort-control.is-open .sort-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}

.sort-option:hover {
  background: rgba(15, 23, 42, .045);
}

.sort-option:active {
  transform: scale(.98);
}

.sort-option.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.sort-option svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s var(--ease), transform .22s var(--ease-spring);
}

.sort-option.is-active svg {
  opacity: 1;
  transform: none;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 14px;
}

.section-heading h2 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.section-heading span {
  color: var(--muted);
  font-size: 12.5px;
}

.folders-section {
  margin-bottom: 26px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 16px;
}

.folder-card {
  display: block;
  width: 100%;
  overflow: hidden;
  text-align: left;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, .76);
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .06);
  transition: transform .38s var(--ease-spring), box-shadow .38s var(--ease), border-color .28s var(--ease);
  animation: card-in .42s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 18ms);
}

.folder-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 18%, #fff);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .11);
}

.folder-card:active {
  transform: translateY(-2px) scale(.988);
}

.folder-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, #eef2f7), #f7f9fc);
}

.folder-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(transparent, rgba(15, 23, 42, .36));
  pointer-events: none;
}

.folder-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease-spring), opacity .4s var(--ease);
}

.folder-card:hover .folder-cover img {
  transform: scale(1.065);
}

.folder-cover .folder-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .9);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -.04em;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #0f172a));
}

.folder-icon {
  position: absolute;
  left: 13px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  z-index: 2;
  border-radius: 10px;
  color: #fff;
  background: rgba(15, 23, 42, .32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.folder-icon svg {
  width: 18px;
  height: 18px;
}

.folder-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(15, 23, 42, .38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.folder-body {
  padding: 12px 14px 14px;
}

.folder-name {
  color: var(--text);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

/* 已屏蔽的标签：封面变灰，标题变淡 */
.folder-card.is-blocked .folder-cover img {
  filter: grayscale(1) brightness(.9);
  opacity: .72;
}

.folder-card.is-blocked .folder-cover {
  background: linear-gradient(135deg, #e6e9ee, #f4f6f9);
}

.folder-card.is-blocked .folder-name,
.folder-card.is-blocked .folder-sub {
  color: var(--muted);
}

.blocked-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: rgba(15, 23, 42, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* 标签页右上角的屏蔽按钮 */
.block-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.block-tag-btn svg {
  width: 16px;
  height: 16px;
}

.block-tag-btn:hover {
  border-color: rgba(220, 38, 38, .32);
  background: #fff;
  color: #b91c1c;
}

.block-tag-btn:active {
  transform: scale(.97);
}

.block-tag-btn.is-blocked {
  border-color: rgba(220, 38, 38, .38);
  color: #b91c1c;
  background: rgba(254, 242, 242, .92);
}

/* ---------------- Image grid ---------------- */

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.image-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  text-align: left;
  cursor: pointer;
  outline: none;
  animation: card-in .46s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 15ms);
}

.image-card:focus-visible .image-thumb {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, #fff);
  outline-offset: 3px;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: none; }
}

.image-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .74);
  background: linear-gradient(135deg, #e8edf4, #f8fafc);
  box-shadow: 0 7px 24px rgba(15, 23, 42, .065);
  transition: transform .42s var(--ease-spring), box-shadow .42s var(--ease);
}

.image-card:hover .image-thumb {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .14);
}

.image-card:active .image-thumb {
  transform: translateY(-2px) scale(.99);
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .55s var(--ease), transform .8s var(--ease-spring);
}

.image-thumb img.is-loaded {
  opacity: 1;
}

.image-card:hover .image-thumb img {
  transform: scale(1.025);
}

.image-shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, .18), transparent 46%);
  transition: opacity .38s var(--ease);
  pointer-events: none;
}

.image-card:hover .image-shine {
  opacity: 1;
}

.image-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(15, 23, 42, .35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

.image-card:hover .image-badge {
  opacity: 1;
  transform: none;
}

.image-group-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  min-width: 28px;
  padding: 3px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 76%, #0f172a);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .28);
  pointer-events: none;
}

.image-fav {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, .34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease);
}

.image-fav:hover {
  background: rgba(15, 23, 42, .52);
}

.image-fav:active {
  transform: scale(.9);
}

.image-fav svg {
  width: 17px;
  height: 17px;
  transform-origin: center;
}

.image-fav .fav-heart path {
  fill: none;
  transition: fill .2s var(--ease);
}

.image-fav.is-favorite {
  background: color-mix(in srgb, var(--accent) 86%, #0f172a);
}

.image-fav.is-favorite .fav-heart path {
  fill: #fff;
  stroke: #fff;
}

.fav-heart {
  transform-origin: center;
}

.fav-heart.pop {
  animation: fav-pop .38s var(--ease-spring);
}

@keyframes fav-pop {
  0% { transform: scale(.7); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.image-caption {
  padding: 9px 4px 0;
}

.image-caption strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s var(--ease);
}

.image-card:hover .image-caption strong {
  color: var(--accent);
}

.image-caption span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- Empty / loading ---------------- */

.empty-state {
  padding: 64px 20px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, .38);
  border-radius: 18px;
  background: rgba(255, 255, 255, .46);
  animation: fade-in .4s var(--ease) both;
}

.empty-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: #a8b5c6;
  border-radius: 20px;
  background: rgba(148, 163, 184, .1);
}

.empty-icon svg {
  width: 38px;
  height: 38px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 800;
}

.empty-state p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.5px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skeleton {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: linear-gradient(100deg, #e9eef5 20%, #f7f9fc 38%, #e9eef5 56%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skeleton:nth-child(2n) { aspect-ratio: 4 / 5; }
.skeleton:nth-child(3n) { aspect-ratio: 3 / 4; }

@keyframes shimmer {
  to { background-position: -220% 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.load-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, .95);
  background: rgba(255, 255, 255, .82);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
  transition: transform .22s var(--ease), background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease);
}

.load-more svg {
  width: 16px;
  height: 16px;
}

.load-more:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 24%, #fff);
  background: #fff;
}

.load-more:active {
  transform: scale(.97);
}

.load-more.is-loading span {
  opacity: .55;
}

.load-more.is-loading svg {
  animation: spin-arrow .9s linear infinite;
}

@keyframes spin-arrow {
  to { transform: rotate(360deg); }
}

.scroll-sentinel {
  height: 2px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 20px 28px;
  color: var(--muted);
  font-size: 12.5px;
}

.site-footer a {
  font-weight: 700;
  transition: color .2s var(--ease);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
}

/* ---------------- Viewer ---------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s var(--ease), visibility .28s var(--ease);
}

.viewer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, .91);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
  backdrop-filter: blur(22px) saturate(115%);
  opacity: 0;
  transition: opacity .4s var(--ease);
}

.viewer.open .viewer-backdrop {
  opacity: 1;
}

.viewer-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
  pointer-events: none;
}

.viewer-heading {
  min-width: 0;
  max-width: min(64vw, 760px);
  pointer-events: auto;
}

.viewer-site {
  display: block;
  color: rgba(255, 255, 255, .46);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.viewer-heading h2 {
  margin-top: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-heading p {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, .55);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-top-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.viewer-circle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}

.viewer-circle:hover {
  color: #fff;
  background: rgba(255, 255, 255, .17);
}

.viewer-circle:active {
  transform: scale(.93);
}

.viewer-circle svg {
  width: 20px;
  height: 20px;
}

.viewer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 76px 112px;
}

.viewer-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  animation: canvas-in .48s var(--ease-spring) both;
}

.viewer-canvas.is-dragging {
  cursor: grabbing;
}

@keyframes canvas-in {
  from { opacity: 0; transform: scale(.955); }
  to { opacity: 1; transform: none; }
}

.viewer-canvas img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  transition: none;
  will-change: transform;
}

.viewer-canvas img.is-ready {
  opacity: 1;
}

.viewer-original {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(15, 23, 42, .74);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.viewer-original:hover {
  background: rgba(15, 23, 42, .9);
  transform: translateX(-50%) translateY(-1px);
}

.viewer-spinner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s var(--ease);
}

.viewer-spinner.show {
  opacity: 1;
}

.viewer-spinner span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .17);
  border-top-color: rgba(255, 255, 255, .8);
  animation: spinner .75s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .2s var(--ease), transform .22s var(--ease), opacity .25s var(--ease);
}

.viewer-arrow:hover {
  background: rgba(255, 255, 255, .18);
}

.viewer-arrow:active {
  transform: translateY(-50%) scale(.93);
}

.viewer-arrow[disabled] {
  opacity: .22;
  cursor: default;
}

.viewer-arrow svg {
  width: 22px;
  height: 22px;
}

.viewer-arrow.prev { left: 18px; }
.viewer-arrow.next { right: 18px; }

.viewer-strip {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 8;
  padding: max(12px, env(safe-area-inset-top)) clamp(12px, 4vw, 28px) 22px;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, .95),
    rgba(8, 12, 22, .84) 62%,
    rgba(8, 12, 22, 0)
  );
  opacity: 0;
  transform: translateY(-102%);
  transition: transform .36s var(--ease-spring), opacity .24s var(--ease);
  pointer-events: none;
}

.viewer-strip.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.viewer-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto 10px;
}

.viewer-strip-label {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.viewer-strip-exit {
  padding: 6px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.viewer-strip-exit:hover {
  background: rgba(255, 255, 255, .25);
}

.viewer-strip-exit:active {
  transform: scale(.97);
}

.viewer-strip-track {
  display: flex;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.viewer-strip-track::-webkit-scrollbar {
  display: none;
}

.strip-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border-radius: 11px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, .08);
  opacity: .56;
  transition: opacity .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-thumb:hover {
  opacity: .86;
}

.strip-thumb.is-active {
  opacity: 1;
  border-color: color-mix(in srgb, var(--accent) 76%, #fff);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .strip-thumb {
    width: 56px;
    height: 56px;
  }
}

.viewer-toolbar {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 9px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(20, 26, 40, .72);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

.zoom-group,
.viewer-tool-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tool-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, .8);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.tool-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.tool-button:active {
  transform: scale(.92);
}

.tool-button svg {
  width: 19px;
  height: 19px;
}

.tool-button.primary {
  color: #fff;
  background: var(--accent);
}

.tool-button.primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #fff);
}

.tool-button.is-favorite {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 82%, #111827);
}

.tool-button.is-favorite .fav-heart path {
  fill: currentColor;
  stroke: currentColor;
}

.tool-button[disabled] {
  opacity: .35;
  cursor: default;
}

.zoom-value {
  min-width: 50px;
  height: 34px;
  padding: 0 4px;
  color: rgba(255, 255, 255, .72);
  font-size: 11.5px;
  font-weight: 800;
  border-radius: 8px;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.zoom-value:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.viewer-counter {
  min-width: 56px;
  padding-left: 14px;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  font-weight: 700;
  border-left: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  white-space: nowrap;
}

.viewer-counter.is-sub {
  color: rgba(255, 212, 138, .88);
}

.viewer-info {
  position: absolute;
  top: 82px;
  right: 20px;
  bottom: 106px;
  z-index: 7;
  width: min(344px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(18, 24, 38, .76);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .32);
  opacity: 0;
  visibility: hidden;
  transform: translateX(22px) scale(.985);
  transition: opacity .3s var(--ease), transform .35s var(--ease-spring), visibility .3s var(--ease);
}

.viewer-info.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.info-head h3 {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.info-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .06);
}

.info-close svg {
  width: 15px;
  height: 15px;
}

.info-body {
  flex: 1;
  overflow-y: auto;
  padding-top: 4px;
}

.info-body::-webkit-scrollbar {
  width: 4px;
}

.info-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
}

.info-block {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.info-block:last-child {
  border-bottom: 0;
}

.info-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, .4);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.info-block strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
}

.info-block > span:not(.info-label),
.info-block p {
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  word-break: break-word;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.info-collections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.info-collection-chip {
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .76);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, .08);
  transition: background .2s var(--ease), color .2s var(--ease);
}

.info-collection-chip:hover {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
}

.info-description {
  line-height: 1.75;
  white-space: pre-wrap;
}

.swipe-hint {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .6);
  font-size: 11.5px;
  background: rgba(255, 255, 255, .07);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}

.swipe-hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 500;
  max-width: min(480px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .92);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .28);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px) scale(.97);
  transition: opacity .28s var(--ease), transform .32s var(--ease-spring), visibility .28s var(--ease);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
  .hero {
    padding: 38px 34px;
  }

  .image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand {
    flex: 1;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }

  .search-box {
    width: 210px;
  }

  .search-box:focus-within {
    width: 250px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
  }

  .hero-side {
    display: grid;
    grid-template-columns: 1fr 120px;
    align-items: end;
  }

  .hero-decoration {
    height: 100px;
  }

  .stat-strip {
    width: min(480px, 100%);
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 10px 10px 0;
  }

  .app-header {
    top: 7px;
    padding: 9px 12px;
    border-radius: 16px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    font-size: 10.5px;
    max-width: 140px;
  }

  .header-actions {
    gap: 6px;
  }

  .search-box {
    width: 40px;
    padding: 0;
    justify-content: center;
    border-color: transparent;
    background: rgba(248, 250, 252, .72);
  }

  .search-box input {
    display: none;
  }

  .search-box > svg {
    width: 18px;
    height: 18px;
  }

  .search-box.is-expanded {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 64px;
    z-index: 8;
    width: auto;
    height: 44px;
    padding: 0 13px;
    justify-content: flex-start;
    border-color: rgba(226, 232, 240, .95);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
  }

  .search-box.is-expanded input {
    display: block;
  }

  .main-nav {
    gap: 1px;
  }

  .nav-link {
    padding: 7px 11px;
    font-size: 14px;
  }

  .page {
    gap: 12px;
    padding: 12px 0;
  }

  .hero {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .hero-badge {
    margin-bottom: 14px;
    font-size: 11.5px;
  }

  .hero h1 {
    font-size: clamp(31px, 9vw, 46px);
    letter-spacing: -.04em;
  }

  .hero-copy > p {
    margin-top: 12px;
    font-size: 14.5px;
    line-height: 1.7;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .hero-decoration {
    display: none;
  }

  .stat {
    padding: 13px 8px 12px;
  }

  .stat strong {
    font-size: 21px;
  }

  .stat span {
    font-size: 11px;
  }

  .announcement {
    margin-top: 16px;
    font-size: 12.5px;
  }

  .library {
    padding: 16px 13px 20px;
    border-radius: 20px;
  }

  .library-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 16px;
  }

  .library-tools {
    width: 100%;
    justify-content: space-between;
  }

  .breadcrumb {
    font-size: 13px;
  }

  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .folder-body {
    padding: 10px 11px 12px;
  }

  .folder-name {
    font-size: 14px;
  }

  .folder-count {
    right: 8px;
    bottom: 8px;
    font-size: 10.5px;
  }

  .folder-icon {
    left: 8px;
    bottom: 8px;
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .folder-icon svg {
    width: 16px;
    height: 16px;
  }

  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .image-thumb {
    border-radius: 13px;
  }

  .image-caption {
    padding-top: 6px;
  }

  .image-caption strong {
    font-size: 13px;
  }

  .image-caption span {
    font-size: 11px;
  }

  .image-badge {
    display: none;
  }

  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
  }

  .site-footer {
    padding-bottom: 24px;
  }

  .viewer-backdrop {
    background: rgba(6, 9, 17, .97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .viewer-circle,
  .viewer-toolbar,
  .viewer-info {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .viewer-stage {
    padding: 76px 6px 106px;
  }

  .viewer-topbar {
    padding: max(14px, env(safe-area-inset-top)) 14px 0;
  }

  .viewer-heading {
    max-width: 68vw;
  }

  .viewer-heading h2 {
    font-size: 16px;
  }

  .viewer-circle {
    width: 38px;
    height: 38px;
  }

  .viewer-arrow {
    display: none;
  }

  .viewer-toolbar {
    bottom: max(14px, env(safe-area-inset-bottom));
    gap: 5px;
    padding: 5px 7px;
  }

  .tool-button {
    width: 36px;
    height: 36px;
  }

  .viewer-counter {
    padding-left: 8px;
    min-width: 48px;
    font-size: 11px;
  }

  .swipe-hint {
    display: block;
    bottom: 74px;
  }

  .viewer-info {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 78px;
    width: auto;
    max-height: 62vh;
    padding: 18px;
    border-radius: 20px;
    transform: translateY(22px) scale(.985);
  }

  .viewer-info.open {
    transform: none;
  }
}

@media (max-width: 440px) {
  .brand-copy small {
    display: none;
  }

  .nav-link {
    padding: 7px 9px;
    font-size: 13.5px;
  }

  .result-count {
    font-size: 12px;
  }

  .folder-grid {
    gap: 9px;
  }

  .image-grid {
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- 以图搜图 ---------------- */

body.search-open {
  overflow: hidden;
}

.imgsearch {
  position: fixed;
  inset: 0;
  z-index: 460;
  display: none;
}

.imgsearch.open {
  display: block;
}

.imgsearch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .38);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  animation: imgsearch-fade .28s var(--ease) both;
}

@keyframes imgsearch-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.imgsearch-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, calc(100vw - 32px));
  max-height: min(86vh, 940px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 32px 90px rgba(15, 23, 42, .3);
  animation: imgsearch-pop .36s var(--ease-spring) both;
}

@keyframes imgsearch-pop {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.imgsearch-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}

.imgsearch-heading {
  flex: 1;
  min-width: 0;
}

.imgsearch-heading h2 {
  font-size: 19px;
  font-weight: 600;
}

.imgsearch-heading p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.imgsearch-heading strong {
  color: var(--accent);
  font-weight: 600;
}

.imgsearch-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, .05);
}

.imgsearch-close svg {
  width: 16px;
  height: 16px;
}

.imgsearch-close:hover {
  color: var(--text);
  background: rgba(15, 23, 42, .1);
}

.imgsearch-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
}

.imgsearch-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 18px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 30%, #cbd5e1);
  border-radius: 18px;
  background: rgba(248, 250, 252, .8);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.imgsearch-drop:hover,
.imgsearch-drop.is-drag {
  border-color: color-mix(in srgb, var(--accent) 60%, #fff);
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}

.imgsearch-drop-icon {
  color: var(--accent);
}

.imgsearch-drop-icon svg {
  width: 30px;
  height: 30px;
}

.imgsearch-drop strong {
  font-size: 14px;
  font-weight: 600;
}

.imgsearch-drop small {
  font-size: 11.5px;
  color: var(--muted);
}

.imgsearch-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.imgsearch-status[hidden] {
  display: none;
}

.imgsearch-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  animation: imgsearch-spin .8s linear infinite;
}

@keyframes imgsearch-spin {
  to { transform: rotate(360deg); }
}

.imgsearch-result {
  margin-top: 16px;
}

.imgsearch-result[hidden] {
  display: none;
}

.imgsearch-empty {
  padding: 26px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.imgsearch-best {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 5%, #fff), #fff 62%);
}

.imgsearch-best-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.imgsearch-best-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.imgsearch-score {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 82%, #000);
}

.imgsearch-best-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.imgsearch-tag {
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(15, 23, 42, .06);
}

.imgsearch-tag.is-strong {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 85%, #000);
}

.imgsearch-best-info h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.imgsearch-artist {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.imgsearch-artist span {
  font-size: 10.5px;
  color: var(--muted);
}

.imgsearch-artist:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.imgsearch-artist.is-empty {
  color: var(--muted);
  background: rgba(15, 23, 42, .05);
  cursor: default;
}

.imgsearch-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  overflow: hidden;
}

.imgsearch-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
}

.imgsearch-note {
  font-size: 11.5px;
  color: var(--muted);
}

.imgsearch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.imgsearch-primary,
.imgsearch-ghost {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12.5px;
}

.imgsearch-primary {
  color: #fff;
  background: var(--accent);
}

.imgsearch-primary:hover {
  filter: brightness(1.05);
}

.imgsearch-ghost {
  color: var(--muted);
  background: rgba(15, 23, 42, .06);
}

.imgsearch-ghost:hover {
  background: rgba(15, 23, 42, .1);
}

.imgsearch-cands {
  margin-top: 16px;
}

.imgsearch-cands-head {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.imgsearch-cand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.imgsearch-cand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.imgsearch-cand-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.imgsearch-cand-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s var(--ease);
}

.imgsearch-cand:hover .imgsearch-cand-media img {
  transform: scale(1.04);
}

.imgsearch-cand-score {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  color: #fff;
  background: rgba(15, 23, 42, .62);
}

.imgsearch-cand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.imgsearch-cand-meta strong {
  font-size: 11.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imgsearch-cand-meta span {
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .imgsearch-panel {
    width: calc(100vw - 20px);
    max-height: 88vh;
    border-radius: 20px;
  }

  .imgsearch-head {
    padding: 16px 16px 12px;
  }

  .imgsearch-body {
    padding: 14px 16px 18px;
  }

  .imgsearch-best {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .imgsearch-best-media {
    aspect-ratio: 4 / 3;
    max-height: 240px;
  }

  .imgsearch-cand-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
