/* =========================================================================
   Cazi取图站 — design system
   Midnight-lavender editorial gallery · mobile first · light & dark
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* "Cazi Sans" = self-hosted Google Sans (Latin) + Noto Sans SC (CJK) subsets, see fonts.css */
  --font-sans: "Cazi Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur: 220ms;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --page-max: 1180px;
  --gutter: 16px;
  --topbar-h: 56px;

  --gold: #f2c46d;
  --danger: #ef5d6c;
  --ok: #3fbf8f;

  color-scheme: light dark;
}

/* Light (default before JS resolves) */
:root,
[data-theme="light"] {
  --bg: #f6f4fb;
  --bg-grad-a: rgba(118, 98, 238, .10);
  --bg-grad-b: rgba(242, 196, 109, .10);
  --surface: #ffffff;
  --surface-2: #f1eef8;
  --surface-3: #e8e4f3;
  --glass: rgba(255, 255, 255, .72);
  --line: rgba(38, 28, 92, .09);
  --line-2: rgba(38, 28, 92, .16);
  --text: #1a1730;
  --text-2: #57536f;
  --text-3: #8c88a6;
  --brand: #5b49d8;
  --brand-ink: #ffffff;
  --brand-soft: rgba(91, 73, 216, .10);
  --gold-ink: #a8761c;
  --shadow-sm: 0 1px 2px rgba(30, 20, 80, .06), 0 1px 1px rgba(30, 20, 80, .04);
  --shadow-md: 0 6px 18px -6px rgba(36, 22, 110, .18), 0 2px 6px rgba(36, 22, 110, .06);
  --shadow-lg: 0 24px 60px -18px rgba(36, 22, 110, .32), 0 8px 18px -8px rgba(36, 22, 110, .14);
  --skeleton-a: #ebe7f4;
  --skeleton-b: #f6f4fb;
  --accent: var(--accent-l, var(--brand));
  --accent-ink: var(--accent-l-ink, #fff);
  --accent-soft: rgba(var(--accent-l-rgb, 91, 73, 216), .12);
  --accent-ring: rgba(var(--accent-l-rgb, 91, 73, 216), .35);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d0c18;
  --bg-grad-a: rgba(112, 92, 240, .20);
  --bg-grad-b: rgba(242, 196, 109, .06);
  --surface: #15132a;
  --surface-2: #1c1a35;
  --surface-3: #25224a;
  --glass: rgba(18, 16, 36, .72);
  --line: rgba(196, 186, 255, .09);
  --line-2: rgba(196, 186, 255, .17);
  --text: #eeecff;
  --text-2: #aca8cc;
  --text-3: #77739b;
  --brand: #a597ff;
  --brand-ink: #14112c;
  --brand-soft: rgba(165, 151, 255, .14);
  --gold-ink: #f2c46d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75), 0 10px 24px -10px rgba(0, 0, 0, .5);
  --skeleton-a: #1b1933;
  --skeleton-b: #24214280;
  --accent: var(--accent-d, var(--brand));
  --accent-ink: var(--accent-d-ink, #14112c);
  --accent-soft: rgba(var(--accent-d-rgb, 165, 151, 255), .15);
  --accent-ring: rgba(var(--accent-d-rgb, 165, 151, 255), .45);
  color-scheme: dark;
}

/* Per-element accent (album cards): re-resolve accent vars locally */
.tinted {
  --accent: var(--accent-l, var(--brand));
  --accent-ink: var(--accent-l-ink, #fff);
  --accent-soft: rgba(var(--accent-l-rgb, 91, 73, 216), .12);
  --accent-ring: rgba(var(--accent-l-rgb, 91, 73, 216), .35);
}
[data-theme="dark"] .tinted {
  --accent: var(--accent-d, var(--brand));
  --accent-ink: var(--accent-d-ink, #14112c);
  --accent-soft: rgba(var(--accent-d-rgb, 165, 151, 255), .15);
  --accent-ring: rgba(var(--accent-d-rgb, 165, 151, 255), .45);
}

@media (min-width: 720px) {
  :root { --gutter: 28px; --topbar-h: 64px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 10% -10%, var(--bg-grad-a), transparent 60%),
    radial-gradient(900px 480px at 110% 0%, var(--bg-grad-b), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.theme-anim, body.theme-anim * {
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), fill .35s var(--ease) !important;
}
img, svg, video { display: block; max-width: 100%; }
img { -webkit-user-drag: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; }
body.no-scroll { overflow: hidden; touch-action: none; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: calc(var(--gutter) + var(--safe-l));
  padding-right: calc(var(--gutter) + var(--safe-r));
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: var(--safe-t);
  background: transparent;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), backdrop-filter var(--dur);
}
.topbar.is-stuck {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.topbar__inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand__mark { width: 30px; height: 30px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.brand__name b { font-weight: 600; letter-spacing: 0; }
.brand__name span { font-weight: 600; color: var(--text-2); margin-left: 1px; }
.topbar__title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.topbar.is-stuck .topbar__title.reveal { opacity: 1; transform: none; }
.topbar__spacer { flex: 1; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px 0 6px;
  margin-left: -8px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease);
}
@media (hover: hover) { .back-link:hover { background: var(--surface-2); } }
@media (max-width: 559px) {
  .topbar.is-stuck.has-title .back-link__txt { display: none; }
  .topbar:not(.is-stuck) .topbar__title { display: none; }
}
.page-album .topbar__inner { gap: 4px; }
.topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur), opacity var(--dur);
}
.btn:active { transform: scale(.965); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-bd: transparent;
  box-shadow: 0 8px 20px -10px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, .18);
}
@media (hover: hover) {
  .btn:hover { border-color: var(--accent-ring); }
  .btn--primary:hover { box-shadow: 0 12px 26px -10px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, .22); filter: brightness(1.05); }
}
.btn--soft { --btn-bg: var(--accent-soft); --btn-fg: var(--accent); --btn-bd: transparent; }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn--danger { --btn-bg: rgba(239, 93, 108, .12); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn--block { width: 100%; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn .badge-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: inline-grid; place-items: center;
  background: rgba(0, 0, 0, .16); font-size: 12.5px; font-weight: 600;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  transition: background-color var(--dur) var(--ease), transform 160ms var(--ease);
}
.icon-btn:active { transform: scale(.92); }
@media (hover: hover) { .icon-btn:hover { background: var(--surface-2); } }
.icon-btn--bordered { border: 1px solid var(--line-2); background: var(--surface); }

/* theme toggle */
.theme-toggle .i-sun, .theme-toggle .i-moon { transition: transform .5s var(--ease-spring), opacity .3s; }
[data-theme="dark"] .theme-toggle .i-sun { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="light"] .theme-toggle .i-moon, :root:not([data-theme]) .theme-toggle .i-moon { position: absolute; opacity: 0; transform: rotate(90deg) scale(.4); }
.theme-toggle { position: relative; }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill--accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pill--gold { color: var(--gold-ink); background: rgba(242, 196, 109, .16); border-color: transparent; }
.pill--glass {
  color: #fff;
  background: rgba(12, 10, 28, .42);
  border-color: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  color: var(--text-2);
  font-size: 13.5px;
}
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Skeleton ---------- */
.skel {
  background: linear-gradient(100deg, var(--skeleton-a) 30%, var(--skeleton-b) 50%, var(--skeleton-a) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-xs);
}
.skel-line { height: 12px; border-radius: 6px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* image that fades in on load */
.fade-img { opacity: 0; transition: opacity .45s var(--ease), transform .6s var(--ease); }
.fade-img.is-loaded { opacity: 1; }

/* ---------- Creator card ---------- */
.creator {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 22px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(165, 151, 255, .30), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(242, 196, 109, .16), transparent 60%),
    linear-gradient(150deg, #2a2160 0%, #1b1640 55%, #131030 100%);
  color: #f1eeff;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
[data-theme="light"] .creator {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .26), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(242, 196, 109, .22), transparent 60%),
    linear-gradient(150deg, #8a7ad6 0%, #6c5bc4 50%, #5546a8 100%);
}
.creator::before {
  /* starfield */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 58% 18%, #ffe7b0 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 46%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 22% 88%, #ffe7b0 50%, transparent 51%);
}
.creator__sparkle {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  color: var(--gold);
  opacity: .9;
  animation: twinkle 3.6s ease-in-out infinite;
  z-index: -1;
}
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: .9; } 50% { transform: scale(.72) rotate(18deg); opacity: .55; } }
.creator__head { display: flex; align-items: center; gap: 14px; }
.creator__avatar {
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #fff 0%, #dcd4ff 100%);
  color: #3a2d8f;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18), 0 10px 24px -8px rgba(0, 0, 0, .5);
}
.creator__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.creator__avatar .dy {
  position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%;
  background: #111; color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 2px #1d1745;
}
.creator__avatar .dy svg { width: 12px; height: 12px; }
.creator__name { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
.creator__id {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 13.5px;
  color: rgba(241, 238, 255, .78);
  border-radius: 8px;
}
.creator__id b { color: #fff; font-weight: 600; font-family: var(--font-sans); }
.creator__id .copy-ico { opacity: .7; }
.creator__bio { margin-top: 14px; font-size: 14px; line-height: 1.7; color: rgba(241, 238, 255, .86); max-width: 46ch; }
.creator__actions { margin-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.creator .btn--dy {
  --btn-bg: #fff;
  --btn-fg: #1c1640;
  --btn-bd: transparent;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
}
.creator .btn--glass {
  --btn-bg: rgba(255, 255, 255, .12);
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.creator--compact { padding: 18px; border-radius: var(--r-lg); }
.creator--compact .creator__avatar { width: 50px; height: 50px; font-size: 20px; }
.creator--compact .creator__name { font-size: 18px; }
.creator--compact .creator__bio { margin-top: 10px; font-size: 13.5px; }
.creator--compact .creator__actions { margin-top: 14px; }
.creator__skeleton { height: 214px; border-radius: var(--r-xl); }
@media (min-width: 720px) {
  .creator { padding: 28px 30px; }
  .creator__actions { display: flex; flex-wrap: wrap; }
  .creator__avatar { width: 68px; height: 68px; font-size: 27px; }
  .creator__name { font-size: 24px; }
}

/* ---------- Home ---------- */
.hero { padding: 10px 0 22px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--accent);
}
.hero__eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.hero__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: 0;
}
.hero__title .grad {
  background: linear-gradient(100deg, var(--brand) 0%, #b07cf0 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub { margin-top: 10px; color: var(--text-2); font-size: 15px; max-width: 40ch; }
.home-grid { display: grid; gap: 22px; }
@media (min-width: 960px) {
  .home-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: end; padding-top: 22px; }
  .hero { padding-bottom: 6px; }
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 34px 0 14px;
}
.section-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: 0; }
.section-head .count { color: var(--text-3); font-size: 13.5px; font-weight: 500; }

/* Featured album (hero card) */
.feature {
  position: relative;
  display: block;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  -webkit-touch-callout: none;
}
.feature:active { transform: scale(.985); }
@media (hover: hover) {
  .feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .feature:hover .feature__cover img { transform: scale(1.035); }
}
.feature__cover { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--skeleton-a); }
.feature__cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease), transform .8s var(--ease); }
.feature__cover::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(to top, rgba(10, 8, 24, .66), transparent);
  pointer-events: none;
}
.feature__badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; z-index: 1; }
.feature__overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16px 18px 18px; color: #fff;
}
.feature__overlay .meta-row { color: rgba(255, 255, 255, .86); }
.feature__overlay .meta-row .dot { background: rgba(255, 255, 255, .6); }
.feature__body { padding: 18px 18px 20px; }
.feature__title { font-family: var(--font-display); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: 0; }
.feature__desc { margin-top: 8px; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature__cta { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feature__cta .go {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14.5px;
}
.feature__cta .go .arrow { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transition: transform .3s var(--ease); }
@media (hover: hover) { .feature:hover .go .arrow { transform: translateX(3px); } }
@media (min-width: 760px) {
  .feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .feature__cover::after { display: none; }
  .feature__overlay { display: none; }
  .feature__body { padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; }
  .feature__title { font-size: 30px; }
  .feature__desc { font-size: 15px; -webkit-line-clamp: 4; }
  .feature__stats { margin-top: 22px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 30px; }
  .feature__cta { margin-top: 28px; }
}
.feature__stats { display: none; }
.desk-only { display: none !important; }
@media (min-width: 760px) { .desk-only { display: inline-flex !important; } }
@media (min-width: 760px) { .feature__stats { display: grid; } .feature__body .meta-row.mobile-only { display: none; } }
.stat b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--text-3); letter-spacing: 0; }

/* Album grid cards */
.album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
@media (min-width: 720px) { .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1080px) { .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.acard { display: block; -webkit-touch-callout: none; }
.acard__cover {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden;
  background: var(--skeleton-a); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.acard__cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease), transform .8s var(--ease); }
.acard__cover .pill { position: absolute; left: 10px; bottom: 10px; height: 24px; font-size: 11.5px; padding: 0 9px; }
.acard:active .acard__cover { transform: scale(.97); }
@media (hover: hover) {
  .acard:hover .acard__cover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .acard:hover .acard__cover img { transform: scale(1.04); }
}
.acard__title { margin-top: 10px; font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard__meta { margin-top: 3px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.acard__accent { position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); border-radius: inherit; pointer-events: none; }

/* placeholder cover (no photos) */
.cover-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-3);
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%), var(--surface-2);
}

/* empty / error states */
.state {
  text-align: center;
  padding: 56px 20px;
  border-radius: var(--r-xl);
  border: 1px dashed var(--line-2);
  background: var(--surface);
  color: var(--text-2);
}
.state__icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.state h3 { color: var(--text); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.state p { font-size: 14px; }
.state .btn { margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 54px;
  padding: 26px 0 calc(30px + var(--safe-b));
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.8;
}
.site-footer .note { max-width: 46ch; margin: 0 auto; }
.site-footer .brandline { margin-top: 6px; letter-spacing: 0; }
.site-footer .brandline .sep { margin: 0 6px; opacity: .5; }
.site-footer a { color: var(--text-2); }

/* ---------- Album page ---------- */
.album-head { padding: 8px 0 18px; }
.album-head__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.album-head__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0;
  word-break: break-word;
}
.album-head__desc { margin-top: 10px; color: var(--text-2); font-size: 14.5px; max-width: 62ch; white-space: pre-line; }
.album-head .meta-row { margin-top: 12px; }
.album-head__actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.album-head__tip {
  margin-top: 14px; display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2);
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft);
}
.album-head__tip .i { color: var(--accent); margin-top: 2px; }
.album-head__tip b { color: var(--text); font-weight: 600; }

.photo-grid {
  --cols: 2;
  --gap: 8px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
}
@media (min-width: 560px) { .photo-grid { --cols: 3; --gap: 12px; } }
@media (min-width: 1000px) { .photo-grid { --cols: 4; --gap: 16px; } }

.ph {
  position: relative;
  aspect-ratio: var(--ratio, 1 / 1);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--skeleton-a);
  cursor: zoom-in;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
  content-visibility: auto;
  contain-intrinsic-size: 300px 300px;
}
.ph::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--skeleton-a) 30%, var(--skeleton-b) 50%, var(--skeleton-a) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.ph.is-loaded::before { display: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease), transform .35s var(--ease); }
@media (hover: hover) {
  .ph:hover img { transform: scale(1.03); }
  .ph:hover .ph__check { opacity: 1; }
}
.ph__idx {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums;
  background: rgba(12, 10, 28, .42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity var(--dur);
}
.ph__size {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  height: 22px; padding: 0 8px; border-radius: 11px; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums;
  background: rgba(12, 10, 28, .42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(4px); transition: opacity var(--dur), transform var(--dur) var(--ease);
}
.ph__check {
  position: absolute; right: 0; top: 0; z-index: 3;
  width: 48px; height: 48px; display: grid; place-items: center;
  opacity: .92; transition: opacity var(--dur);
}
.ph__check .box {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, .92);
  background: rgba(12, 10, 28, .22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s var(--ease), border-color .2s, transform .3s var(--ease-spring);
}
.ph__check .box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s var(--ease-spring); }
.ph.is-selected .ph__check .box { background: var(--accent); border-color: #fff; transform: scale(1.06); }
.ph.is-selected .ph__check .box svg { opacity: 1; transform: none; stroke: var(--accent-ink); }
.ph.is-selected { box-shadow: 0 0 0 3px var(--accent), 0 10px 26px -12px var(--accent-ring); }
.ph.is-selected img { transform: scale(.94); border-radius: calc(var(--r-md) - 4px); }
.ph.is-selected::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--accent-d-rgb, 165, 151, 255), .14), transparent 40%);
}
body.selecting .ph { cursor: pointer; }
body.selecting .ph__size, body.selecting .ph__idx { opacity: 1; transform: none; }
body.selecting .ph:not(.is-selected) img { opacity: .82; }
.ph:active { transform: scale(.975); }
.ph-skeleton { aspect-ratio: 1 / 1; border-radius: var(--r-md); }

/* Selection dock (sticky bottom) */
.dock-space { height: calc(96px + var(--safe-b)); }
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  padding: 0 calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  pointer-events: none;
  transform: translateY(0);
  transition: transform .4s var(--ease);
}
.dock.is-hidden { transform: translateY(130%); }
.dock__panel {
  pointer-events: auto;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 24px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}
.dock__row { display: flex; align-items: center; gap: 8px; }
.dock__info { flex: 1; min-width: 0; padding: 0 6px 0 4px; line-height: 1.25; }
.dock__info b { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dock__info span { display: block; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .btn { min-height: 46px; }
.dock .btn--primary { padding: 0 18px; }
.dock__close { flex: none; }
.dock__mode-normal, .dock__mode-select { display: flex; align-items: center; gap: 8px; width: 100%; }
.dock__mode-normal .btn { flex: 1; }
.dock__mode-normal .btn--primary { flex: 1.35; }
.dock.selecting .dock__mode-normal { display: none; }
.dock:not(.selecting) .dock__mode-select { display: none; }
@media (max-width: 380px) {
  .dock .btn { padding: 0 13px; font-size: 14px; }
  .dock__info b { font-size: 14px; }
}
.dock__toggle-all .lbl-short { display: none; }
/* Phones: two-row selection dock — status row + full-width thumb-reachable CTA */
@media (max-width: 559px) {
  .dock__mode-select {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "close info all" "save save save";
    gap: 4px 6px;
  }
  .dock__close { grid-area: close; width: 40px; height: 40px; }
  .dock__info { grid-area: info; align-self: center; }
  .dock__toggle-all {
    grid-area: all;
    --btn-bg: var(--accent-soft); --btn-fg: var(--accent); --btn-bd: transparent;
    min-height: 40px !important; padding: 0 16px !important; font-size: 14px;
  }
  .dock__mode-select [data-act="save"] { grid-area: save; width: 100%; min-height: 50px; font-size: 16px; }
  body.selecting .dock-space { height: calc(150px + var(--safe-b)); }
}

/* ---------- Toasts ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 14px);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(22, 19, 44, .92);
  color: #f3f1ff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .08);
  animation: toast-in .35s var(--ease-spring);
}
[data-theme="light"] .toast { background: rgba(26, 23, 48, .9); }
.toast.is-out { animation: toast-out .25s var(--ease) forwards; }
.toast .i { width: 18px; height: 18px; }
.toast--ok .i { color: #7be3b9; }
.toast--err .i { color: #ff8f9b; }
.toast--info .i { color: #c3b8ff; }
.toast__progress { flex: 1; min-width: 0; }
.toast__bar { margin-top: 7px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.toast__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a597ff, var(--gold)); border-radius: 2px; transition: width .25s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* ---------- Sheet / modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 6, 20, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.overlay.is-open { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 24px - var(--safe-t));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform .42s var(--ease);
  overflow: hidden;
}
.overlay.is-open .sheet { transform: none; }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 9px auto 0; flex: none; }
.sheet__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px 20px; flex: none; }
.sheet__head h3 { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; }
.sheet__body { padding: 8px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet__foot { padding: 12px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; display: flex; gap: 10px; }
.sheet__foot .btn { flex: 1; }
.sheet--full { max-width: 760px; height: calc(100dvh - 18px - var(--safe-t)); }
@media (min-width: 720px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 26px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .35s var(--ease), opacity .25s; }
  .overlay.is-open .sheet { opacity: 1; }
  .sheet__grab { display: none; }
  .sheet__foot { padding-bottom: 18px; }
  .sheet--full { height: min(860px, calc(100dvh - 48px)); }
}

/* QR modal */
.qr-card { text-align: center; padding-bottom: 6px; }
.qr-card__img {
  position: relative;
  width: min(100%, 300px);
  margin: 4px auto 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  -webkit-touch-callout: default;
  min-height: 200px;
}
.qr-card__img img { width: 100%; height: auto; -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; pointer-events: auto; }
.qr-card__tip { margin-top: 14px; font-size: 13.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.qr-card__id {
  margin: 16px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 320px; padding: 6px 6px 6px 16px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px;
}
.qr-card__id b { font-weight: 600; }
.qr-card__none { padding: 40px 10px; color: var(--text-3); }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #07060f;
  color: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity .28s var(--ease);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.lb.is-open { opacity: 1; }
.lb__bg {
  position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.3) brightness(.38);
  opacity: .9; transition: background-image .4s;
}
.lb__top, .lb__bottom { position: relative; z-index: 3; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.lb.ui-hidden .lb__top { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.lb.ui-hidden .lb__bottom { opacity: 0; transform: translateY(10px); pointer-events: none; }
.lb__top {
  display: flex; align-items: center; gap: 8px;
  padding: calc(6px + var(--safe-t)) calc(8px + var(--safe-r)) 6px calc(8px + var(--safe-l));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent);
}
.lb__count { flex: 1; text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.lb .icon-btn { color: #fff; }
@media (hover: hover) { .lb .icon-btn:hover { background: rgba(255, 255, 255, .1); } }
.lb__stage { position: relative; z-index: 1; flex: 1; min-height: 0; overflow: hidden; }
.lb__track { position: absolute; inset: 0; display: flex; will-change: transform; }
.lb__slide {
  position: relative; flex: none; width: 100%; height: 100%;
  display: grid; place-items: center; padding: 8px calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l));
}
.lb__frame { position: relative; max-width: 100%; max-height: 100%; display: grid; }
.lb__frame > img {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  -webkit-touch-callout: default;
  user-select: auto;
  -webkit-user-select: auto;
}
.lb__thumb { filter: blur(0); }
.lb__orig { opacity: 0; transition: opacity .35s var(--ease); }
.lb__orig.is-loaded { opacity: 1; }
.lb__loading {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: 15px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .9);
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  pointer-events: none; transition: opacity .3s;
}
.lb__slide.orig-ready .lb__loading { opacity: 0; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; }
.spinner--accent { border-color: var(--accent-soft); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.lb__nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; display: none; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color var(--dur), opacity var(--dur);
}
.lb__nav:hover { background: rgba(255, 255, 255, .16); }
.lb__nav[disabled] { opacity: .25; pointer-events: none; }
.lb__nav--prev { left: calc(18px + var(--safe-l)); }
.lb__nav--next { right: calc(18px + var(--safe-r)); }
@media (hover: hover) and (pointer: fine) { .lb__nav { display: grid; } }
.lb__bottom {
  padding: 10px calc(14px + var(--safe-r)) calc(12px + var(--safe-b)) calc(14px + var(--safe-l));
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent);
}
.lb__info { max-width: 720px; margin: 0 auto 10px; text-align: center; }
.lb__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb__meta { margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .66); font-variant-numeric: tabular-nums; }
.lb__actions { display: flex; justify-content: center; gap: 8px; max-width: 520px; margin: 0 auto; }
.lb__actions .btn { flex: 1; --btn-bg: rgba(255, 255, 255, .1); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 0 12px; font-size: 14px; }
.lb__actions .btn--primary { --btn-bg: #fff; --btn-fg: #15122e; --btn-bd: transparent; flex: 1.3; box-shadow: none; }
.lb__actions .btn.is-on { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: transparent; }
.lb__hint { margin-top: 9px; text-align: center; font-size: 11.5px; color: rgba(255, 255, 255, .5); }

/* Avatar preview */
.avatar-pv {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 4, 12, .55);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.avatar-pv.is-open { opacity: 1; pointer-events: auto; }
.avatar-pv__card {
  width: min(100%, 360px);
  border-radius: 26px;
  padding: 24px 20px 18px;
  background: #fff;
  color: #17142c;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7);
  transform: translateY(14px) scale(.97);
  transition: transform .4s var(--ease-spring);
  text-align: center;
}
.avatar-pv.is-open .avatar-pv__card { transform: none; }
.avatar-pv__big {
  width: 168px; height: 168px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(23, 20, 44, .08), 0 18px 34px -14px rgba(23, 20, 44, .45);
}
.avatar-pv__big img, .avatar-pv__row img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pv__name { margin-top: 14px; font-weight: 600; font-size: 17px; }
.avatar-pv__sub { font-size: 12.5px; color: #8a86a3; }
.avatar-pv__list { margin-top: 18px; display: grid; gap: 10px; text-align: left; }
.avatar-pv__row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: #f4f2fa; }
.avatar-pv__row.dark { background: #16142a; color: #f1efff; }
.avatar-pv__row .av { flex: none; border-radius: 50%; overflow: hidden; }
.avatar-pv__row .av.s44 { width: 44px; height: 44px; }
.avatar-pv__row .av.s32 { width: 32px; height: 32px; }
.avatar-pv__row .lines { flex: 1; min-width: 0; }
.avatar-pv__row .lines i { display: block; height: 8px; border-radius: 4px; background: currentColor; opacity: .14; }
.avatar-pv__row .lines i + i { margin-top: 6px; width: 62%; opacity: .09; }
.avatar-pv__row .bubble { padding: 7px 11px; border-radius: 14px 14px 14px 4px; background: #fff; font-size: 12.5px; color: #17142c; }
.avatar-pv__row.dark .bubble { background: #2a2650; color: #f1efff; }
.avatar-pv__close { margin-top: 16px; }

/* ---------- Passcode gate ---------- */
.gate {
  max-width: 420px;
  margin: 8vh auto 0;
  padding: 30px 24px 26px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.gate__lock {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px;
  display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), transparent 60%), var(--accent-soft);
}
.gate__lock .i { width: 30px; height: 30px; }
.gate h1 { font-size: 21px; font-weight: 600; line-height: 1.3; }
.gate p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.gate .meta-row { justify-content: center; margin-top: 10px; }
.gate form { margin-top: 22px; display: grid; gap: 12px; }
.gate.shake { animation: shake .45s var(--ease); }
.gate__err { min-height: 20px; font-size: 13px; color: var(--danger); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Form fields (shared with admin) ---------- */
.field { display: grid; gap: 6px; text-align: left; }
.field > span, .field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { font-size: 12px; color: var(--text-3); }
.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px; /* prevents iOS zoom */
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur), background-color var(--dur);
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.input--code { text-align: center; letter-spacing: .3em; font-weight: 600; font-size: 20px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); letter-spacing: 0; font-weight: 400; }

/* ---------- Batch save drawer ---------- */
.save-guide {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text);
  font-size: 14px; line-height: 1.55;
}
.save-guide .i { color: var(--accent); margin-top: 2px; }
.save-guide b { font-weight: 600; }
.save-tip {
  margin-top: 8px; display: flex; gap: 8px; align-items: center;
  font-size: 12.5px; color: var(--text-2); padding: 0 4px;
}
.save-tip .i { color: var(--gold-ink); width: 16px; height: 16px; }
.save-list { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.save-item { position: relative; min-width: 0; }
.save-item__img {
  position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--skeleton-a);
  -webkit-touch-callout: default;
}
.save-item__img img {
  width: 100%; height: auto; -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto;
  opacity: 0; transition: opacity .4s var(--ease);
}
.save-item__img img.is-loaded { opacity: 1; }
.save-item__img .spinner-wrap { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.save-item__img img.is-loaded + .spinner-wrap { display: none; }
.save-item__badge {
  position: absolute; left: 10px; top: 10px; z-index: 1; pointer-events: none;
  height: 26px; padding: 0 10px; border-radius: 13px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(12, 10, 28, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums;
}
.save-item__meta { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.save-item__meta .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-weight: 600; }
.save-item__meta > span:last-child { flex: none; white-space: nowrap; }

/* Progress sheet (share engine) */
.prog { text-align: center; padding: 10px 4px 4px; }
.prog__ring { position: relative; width: 92px; height: 92px; margin: 6px auto 14px; }
.prog__ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.prog__ring .done-ico .i { width: 38px; height: 38px; stroke-width: 2.4; }
.prog__ring circle { fill: none; stroke-width: 7; }
.prog__ring .track { stroke: var(--surface-3); }
.prog__ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .3s var(--ease); }
.prog__ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; }
.prog__ring .done-ico { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease-spring); }
.prog.is-ready .prog__ring .pct { opacity: 0; }
.prog.is-ready .prog__ring .done-ico { opacity: 1; transform: none; }
.prog__title { font-size: 17px; font-weight: 600; }
.prog__sub { margin-top: 4px; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.prog__actions { margin-top: 20px; display: grid; gap: 10px; }
.prog__hint { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }

/* ---------- Misc ---------- */
.fade-up { animation: fade-up .55s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
.stagger > * { animation: fade-up .55s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 50ms; }
.stagger > *:nth-child(3) { animation-delay: 100ms; }
.stagger > *:nth-child(4) { animation-delay: 150ms; }
.stagger > *:nth-child(5) { animation-delay: 200ms; }
.stagger > *:nth-child(6) { animation-delay: 250ms; }
.stagger > *:nth-child(n+7) { animation-delay: 300ms; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.muted { color: var(--text-3); }
.mt-section { margin-top: 40px; }

/* ---------- Stepped display sizes (no viewport-scaled type) ---------- */
@media (min-width: 720px) {
  .hero__title { font-size: 44px; }
  .album-head__title { font-size: 36px; }
}
@media (min-width: 1100px) {
  .hero__title { font-size: 52px; }
  .album-head__title { font-size: 40px; }
}

/* ---------- Creator avatar (auto-fetched Douyin avatar) ---------- */
.creator__avatar .av-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
  opacity: 0; transition: opacity .4s var(--ease);
}
.creator__avatar .av-img.is-loaded { opacity: 1; }
.creator__avatar.has-img { background: rgba(255, 255, 255, .14); }
.creator__avatar.has-img .av-mono { transition: opacity .3s; }
.creator__avatar.img-ok .av-mono { opacity: 0; }
.creator__avatar .dy { z-index: 1; }
