:root {
  --bg: #080b16;
  --panel: #11182b;
  --panel-2: #17213d;
  --text: #eef2ff;
  --muted: #9aa8d4;
  --line: rgba(148, 163, 184, 0.2);
  --accent: #a78bfa;
  --accent-strong: #7c3aed;
  --accent-2: #22c55e;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0,0,0,0.34);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 0%, rgba(167,139,250,0.18), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(34,197,94,0.08), transparent 28%),
    linear-gradient(180deg, #090d19 0%, var(--bg) 52%, #050713 100%);
  color: var(--text);
  min-height: 100vh;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.95; }
img { max-width: 100%; display: block; }
.corner-login,
.corner-auth {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 40;
}
.corner-login,
.corner-auth-link,
.corner-auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(8, 11, 22, 0.14);
  color: rgba(238,242,255,0.62);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  backdrop-filter: blur(8px);
  transition: opacity .18s ease, color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.corner-login:hover,
.corner-auth-link:hover,
.corner-auth-primary:hover {
  opacity: 1;
  color: #eef2ff;
  background: rgba(8, 11, 22, 0.52);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}
.corner-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: .38;
  transition: opacity .18s ease;
}
.corner-auth:hover,
.corner-auth:focus-within { opacity: 1; }
.corner-auth-primary { color: rgba(255,255,255,0.86); background: rgba(124,58,237,0.42); }
.inline-form { display: inline-flex; margin: 0; }
.wrap { width: min(1380px, calc(100vw - 30px)); margin: 0 auto 56px; }
body:has(.living-gallery) .wrap { margin-top: 0; }
body:has(.gallery-detail) .wrap { margin-top: 14px; margin-bottom: 32px; }
.panel, .card, .image-card, .error-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.panel h1 { margin: 0 0 6px; font-size: 28px; }
.muted { margin: 0; color: var(--muted); }
.eyebrow { margin: 0 0 6px; color: #c4b5fd; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; }
input, textarea {
  width: 100%; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--text); padding: 12px 14px; outline: none;
}
input:focus, textarea:focus { border-color: rgba(167,139,250,0.78); box-shadow: 0 0 0 3px rgba(139,92,246,0.16); }
button, .btn, .ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; cursor: pointer;
  background: rgba(255,255,255,0.05); color: var(--text); font-weight: 750;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}
button:hover, .btn:hover, .ghost:hover { transform: translateY(-1px); border-color: rgba(167,139,250,0.42); opacity: 1; }
.btn { background: linear-gradient(135deg, var(--accent-strong), #4f46e5); border-color: transparent; box-shadow: 0 12px 28px rgba(124,58,237,0.28); }
.ghost { background: rgba(255,255,255,0.035); }
.danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.36); color: #fecaca; }
.linklike { padding: 10px 14px; }
.toolbar { margin: 0 0 16px; display: flex; justify-content: flex-end; }
.toolbar-top { margin-top: 4px; }
.gallery-toolbar { margin-bottom: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.compact-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 320px)); align-items: start; }
.card { border-radius: 18px; overflow: hidden; }
.card-cover { display: block; aspect-ratio: 4 / 3; background: rgba(255,255,255,0.03); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { height: 100%; display: grid; place-items: center; color: var(--muted); }
.card-body { padding: 14px; }
.compact-card-body { padding: 12px 14px 14px; }
.compact-card-body h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.meta { color: var(--muted); font-size: 12px; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.gallery-empty { background: rgba(255,255,255,0.025); }

.living-gallery {
  display: grid;
  gap: 22px;
  margin: 4px 0 32px;
}
.showcase-hero {
  position: relative;
  min-height: clamp(520px, 66vh, 760px);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 28px 88px rgba(0,0,0,0.44);
  background: #050713;
  isolation: isolate;
}
.showcase-backdrop {
  position: absolute;
  inset: -48px;
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.22) brightness(0.52);
  transform: scale(1.08);
  opacity: .78;
  z-index: 0;
}
.showcase-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,7,19,.88) 0%, rgba(5,7,19,.48) 34%, rgba(5,7,19,.08) 68%, rgba(5,7,19,.54) 100%),
    linear-gradient(180deg, rgba(5,7,19,.12), rgba(5,7,19,.62));
}
.showcase-stage {
  position: absolute;
  inset: 24px 34px 24px min(37vw, 520px);
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
}
.showcase-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.055) translateY(-1.8%);
  animation: showcase-pan-y 12s ease-in-out infinite alternate;
  transition: transform .8s ease, opacity .42s ease, filter .42s ease;
}
@keyframes showcase-pan-y {
  from { transform: scale(1.055) translateY(-2.4%); }
  to { transform: scale(1.055) translateY(2.4%); }
}
.showcase-hero.is-switching .showcase-stage img { opacity: .42; transform: scale(1.075); animation: none; filter: blur(3px); }
.showcase-copy {
  position: relative;
  z-index: 3;
  width: min(420px, 42vw);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 0 70px 52px;
}
.showcase-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 76px);
  line-height: .95;
  letter-spacing: -0.07em;
  text-wrap: balance;
  text-shadow: 0 10px 44px rgba(0,0,0,0.58);
}
.showcase-subtitle {
  margin: 22px 0 0;
  max-width: 360px;
  color: #c7d2fe;
  line-height: 1.72;
  font-size: 15px;
}
.showcase-actions { display: flex; align-items: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.showcase-toggle { min-width: 78px; }
.showcase-meta {
  position: absolute;
  z-index: 4;
  left: 52px;
  right: 52px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #e0e7ff;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.showcase-progress { flex: 1; height: 2px; background: rgba(255,255,255,.16); overflow: hidden; border-radius: 999px; }
.showcase-progress i { display: block; width: 100%; height: 100%; transform-origin: left center; background: linear-gradient(90deg, #a78bfa, #22c55e); transform: scaleX(0); }
@keyframes showcase-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.showcase-nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 44px;
  height: 74px;
  border-radius: 999px;
  padding: 0;
  transform: translateY(-50%);
  background: rgba(8,11,22,.38);
  border-color: rgba(255,255,255,.2);
  font-size: 42px;
  font-weight: 300;
  backdrop-filter: blur(14px);
}
.showcase-nav:hover { transform: translateY(-50%) scale(1.04); }
.showcase-prev { left: 16px; }
.showcase-next { right: 16px; }
.mosaic-head, .archive-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 2px 0;
}
.archive-head { margin: 6px 2px 12px; opacity: .82; }
.mosaic-head h2 { margin: 0; font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.04em; }
.archive-head h2 { margin: 0; font-size: clamp(18px, 2vw, 24px); letter-spacing: -0.04em; }
.mosaic-head span { color: var(--muted); font-size: 13px; }
.living-mosaic {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  grid-auto-rows: 168px;
  gap: 12px;
}
.mosaic-tile {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.04);
  box-shadow: 0 16px 42px rgba(0,0,0,.24);
}
.mosaic-large { grid-row: span 2; grid-column: span 2; }
.mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.045) translateY(-1.6%);
  animation: gallery-pan-y 10s ease-in-out infinite alternate;
  transition: opacity .36s ease, transform .42s ease, filter .36s ease;
}
@keyframes gallery-pan-y {
  from { transform: scale(1.045) translateY(-2.2%); }
  to { transform: scale(1.045) translateY(2.2%); }
}
.mosaic-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.62));
  pointer-events: none;
}
.mosaic-tile span {
  position: absolute;
  z-index: 2;
  left: 13px; right: 13px; bottom: 12px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .24s ease, transform .24s ease;
  text-shadow: 0 2px 12px rgba(0,0,0,.82);
}
.mosaic-tile:hover span { opacity: 1; transform: translateY(0); }
.mosaic-tile:hover img { transform: scale(1.06) translateY(0); animation-play-state: paused; filter: saturate(1.08); }
.mosaic-tile.is-refreshing img { opacity: .16; transform: scale(1.06); animation: none; filter: blur(5px); }
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 210px));
  justify-content: center;
  align-items: start;
  gap: 12px;
}
.gallery-card {
  width: 100%;
  margin: 0;
  border-radius: 18px;
}
.gallery-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 18px 42px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  transform: translateZ(0);
}
.gallery-cover::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,0.62) 100%);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity .24s ease;
}
.gallery-cover::after {
  content: "图片加载失败";
  position: absolute; inset: 0;
  display: none; place-items: center;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(255,255,255,0.04));
}
.gallery-cover.image-failed img { opacity: 0; min-height: 220px; }
.gallery-cover.image-failed::after { display: grid; }
.gallery-cover img {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.045) translateY(-1.6%);
  animation: gallery-pan-y 11s ease-in-out infinite alternate;
  transition: transform .34s ease, filter .34s ease;
}
.gallery-cover:hover::before { opacity: .72; }
.gallery-cover:hover img { transform: scale(1.06) translateY(0); animation-play-state: paused; filter: saturate(1.08) contrast(1.03); }
.gallery-cover:hover { border-color: rgba(167,139,250,0.36); box-shadow: 0 24px 58px rgba(0,0,0,0.38); }
.gallery-title {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  z-index: 2;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .24s ease, transform .24s ease;
  text-shadow: 0 2px 14px rgba(0,0,0,0.8);
}
.gallery-cover:hover .gallery-title { opacity: 1; transform: translateY(0); }
.gallery-placeholder { min-height: 220px; }

.detail { display: grid; gap: 12px; }
.gallery-detail { gap: 10px; }
.detail h1 { margin: 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.03em; }
.detail-actions, .inline-form { display: inline-flex; gap: 8px; }
.detail-floating-actions {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  opacity: .72;
  transition: opacity .18s ease;
}
.detail-floating-actions:hover,
.detail-floating-actions:focus-within { opacity: 1; }
.detail-back-link {
  min-width: 112px;
  padding: 8px 12px;
  border-color: rgba(167,139,250,0.28);
  background: rgba(8,11,22,0.32);
  color: #f4f0ff;
  backdrop-filter: blur(12px);
  box-shadow: none;
}
.detail-back-link:hover { background: rgba(8,11,22,0.58); }
.detail-mini-action { padding: 8px 12px; box-shadow: none; }
.panel { border-radius: 22px; padding: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 18px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.hero-gallery { display: grid; gap: 10px; }
.hero-image {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 30px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(255,255,255,0.055), rgba(5,7,19,0.92) 62%);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: var(--shadow);
  width: 100%;
}
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(5,7,19,0.34), rgba(5,7,19,0.06) 35%, rgba(5,7,19,0.06) 65%, rgba(5,7,19,0.34));
  pointer-events: none;
}
.hero-backdrop-img {
  position: absolute;
  inset: -34px;
  width: calc(100% + 68px);
  height: calc(100% + 68px);
  max-width: none;
  object-fit: cover;
  filter: blur(30px) saturate(1.18) brightness(0.54);
  opacity: 0.58;
  transform: scale(1.04);
  z-index: 0;
}
.hero-main-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: auto;
  max-width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.hero-main-button:hover { transform: none; border-color: transparent; }
.hero-main-img {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 100%;
  max-height: min(62vh, calc(100vh - 300px), 680px);
  object-fit: contain;
  background: transparent;
}
.hero-switch {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255,255,255,0.18);
  background: rgba(8,11,22,0.28);
  color: rgba(255,255,255,0.82);
  font-size: 42px;
  line-height: 1;
  box-shadow: 0 16px 42px rgba(0,0,0,0.24);
  backdrop-filter: blur(10px);
}
.hero-switch:hover {
  transform: translateY(-50%) scale(1.03);
  background: rgba(8,11,22,0.48);
  border-color: rgba(255,255,255,0.34);
  color: #fff;
}
.hero-switch-prev { left: clamp(18px, 4vw, 58px); }
.hero-switch-next { right: clamp(18px, 4vw, 58px); }
.thumb-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 108px);
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
}
.thumb-card {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  opacity: 0.72;
}
.thumb-card.active, .thumb-card:hover { opacity: 1; border-color: rgba(167,139,250,0.5); }
.thumb-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Immersive collection viewer: replaces the old bottom thumbnail strip on detail pages. */
.immersive-viewer { gap: 0; }
.immersive-stage {
  min-height: clamp(680px, calc(100vh - 28px), 920px);
  border-radius: 34px;
  isolation: isolate;
}
.immersive-stage::after {
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,0.02), transparent 34%),
    linear-gradient(90deg, rgba(5,7,19,0.58), rgba(5,7,19,0.06) 36%, rgba(5,7,19,0.06) 64%, rgba(5,7,19,0.58)),
    linear-gradient(180deg, rgba(5,7,19,0.30), transparent 26%, rgba(5,7,19,0.52));
}
.immersive-stage .hero-backdrop-img {
  inset: -64px;
  width: calc(100% + 128px);
  height: calc(100% + 128px);
  filter: blur(42px) saturate(1.22) brightness(0.46);
  opacity: .78;
  transform: scale(1.08);
}
.immersive-stage .hero-main-button {
  width: min(76vw, 860px);
  height: min(84vh, 860px);
  max-width: calc(100% - 170px);
  border-radius: 24px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background: rgba(0,0,0,.16);
}
.immersive-stage .hero-main-button.is-dragging { cursor: grabbing; }
.immersive-stage .hero-main-button.is-zoomed { background: rgba(0,0,0,.24); }
.immersive-stage .hero-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.48);
  transform: translate(0, 0) scale(1);
  transform-origin: center center;
  user-select: none;
  will-change: transform;
  transition: transform .12s ease, filter .3s ease, opacity .3s ease;
}
.immersive-stage .hero-main-button.is-dragging .hero-main-img { transition: none; }
.immersive-stage .hero-main-button:hover .hero-main-img {
  filter: saturate(1.04) contrast(1.02);
}
.viewer-top-overlay,
.viewer-bottom-overlay {
  position: absolute;
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.viewer-top-overlay {
  top: 22px;
  color: rgba(226,232,240,.68);
  font-size: 12px;
  letter-spacing: .08em;
}
.viewer-reset-toggle,
.viewer-zoom-label {
  pointer-events: auto;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8,11,22,.34);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(248,250,252,.82);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.viewer-zoom-label {
  min-width: 50px;
  text-align: center;
  pointer-events: none;
}
.viewer-bottom-overlay {
  bottom: 22px;
  justify-content: space-between;
  gap: 14px;
}
.viewer-bottom-overlay > * { pointer-events: auto; }
.viewer-caption-stack {
  pointer-events: auto;
  display: grid;
  gap: 11px;
  align-items: start;
  max-width: min(420px, 42vw);
}
.viewer-title-block {
  display: grid;
  gap: 2px;
  padding: 0;
  text-shadow: 0 12px 34px rgba(0,0,0,0.72);
}
.viewer-title-block .eyebrow { margin: 0; color: #c4b5fd; }
.viewer-title-block h1 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1;
  letter-spacing: -0.055em;
}
.viewer-play-toggle {
  min-width: 112px;
  background: rgba(8,11,22,.42);
  border-color: rgba(255,255,255,.18);
  backdrop-filter: blur(14px);
}
.viewer-progress {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(8,11,22,.38);
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(14px);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 800;
}
.viewer-dots { display: inline-flex; align-items: center; gap: 7px; max-width: min(42vw, 460px); overflow: hidden; }
.viewer-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.32);
  opacity: .78;
}
.viewer-dot.active { width: 22px; background: #e9d5ff; opacity: 1; }
.viewer-dot:hover { transform: none; background: rgba(255,255,255,.74); }
.immersive-stage.is-playing .viewer-top-overlay,
.immersive-stage.is-playing .viewer-bottom-overlay { opacity: .18; }
.immersive-stage.is-playing:hover .viewer-top-overlay,
.immersive-stage.is-playing:hover .viewer-bottom-overlay { opacity: 1; }
.manage-images-panel { box-shadow: none; background: rgba(255,255,255,0.022); }
.manage-image-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.manage-image-row { margin: 0; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,0.035); border: 1px solid var(--line); }
.manage-image-row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 32%; }
.manage-image-row figcaption { display: grid; gap: 10px; padding: 10px; color: var(--muted); font-size: 12px; }
.image-row-actions, .focus-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-action { padding: 6px 9px; font-size: 12px; border-radius: 999px; }
button:disabled, .ghost:disabled { opacity: .32; cursor: not-allowed; transform: none; }
.hidden-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(251,191,36,0.36);
  background: rgba(251,191,36,0.13);
  color: #fde68a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}
.gallery-hidden-badge { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 5px 9px; }
.detail-hidden-badge { margin-left: 10px; padding: 3px 8px; vertical-align: middle; }
.danger-text { color: #fecaca !important; }

.prompt-card-panel {
  border-radius: 26px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(167,139,250,0.08), rgba(255,255,255,0.025));
  border: 1px solid rgba(167,139,250,0.18);
  box-shadow: var(--shadow);
}
.prompt-card-head { margin-bottom: 12px; }
.prompt-card-head h2 { margin: 0; }
.prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prompt-display {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
  color: #e8edff;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 16px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  position: relative;
}
.prompt-display.collapsed { max-height: 230px; overflow: hidden; }
.prompt-display.collapsed::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 72px;
  background: linear-gradient(180deg, transparent, rgba(15,18,33,0.98));
  pointer-events: none;
}
.visually-hidden { position: fixed !important; left: -9999px !important; top: auto !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.copy-btn { min-width: 92px; }

.lightbox, .confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.lightbox.open, .confirm-modal.open { display: flex; }
.lightbox-backdrop, .confirm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.84); backdrop-filter: blur(14px); }
.lightbox-shell {
  position: relative;
  width: min(92vw, 1420px);
  height: min(90vh, 920px);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  padding: 76px 76px 54px;
}
.lightbox-figure {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}
.lightbox-viewport {
  position: relative;
  width: min(100%, 1280px);
  height: 100%;
  max-height: min(100%, 760px);
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: zoom-in;
  touch-action: none;
}
.lightbox-viewport.is-zoomed { cursor: grab; }
.lightbox-viewport.is-dragging { cursor: grabbing; }
.lightbox-viewport.image-failed::after {
  content: "图片加载失败";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(8,11,22,0.9);
}
.lightbox-viewport img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: min(84%, calc(90vh - 190px));
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.5);
  user-select: none;
  will-change: transform;
  transform-origin: center center;
  transition: transform .12s ease;
}
.lightbox-viewport.is-dragging img { transition: none; }
.lightbox-viewport img.is-zoomed { max-width: 100%; max-height: 100%; }
.lightbox-figure figcaption { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #f8fafc; background: rgba(0,0,0,0.46); border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 7px 12px; font-size: 13px; }
.lightbox-close, .lightbox-nav, .lightbox-tool { position: absolute; z-index: 2; border-color: rgba(255,255,255,0.18); background: rgba(0,0,0,0.46); }
.lightbox-close { right: 18px; top: 14px; width: 44px; height: 44px; font-size: 28px; padding: 0; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 68px; font-size: 44px; padding: 0; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-toolbar {
  position: absolute;
  top: 14px;
  left: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.36);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
}
.lightbox-tool {
  position: static;
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  font-size: 16px;
  line-height: 1;
}
.lightbox-fit { min-width: 52px; font-size: 13px; }
.lightbox-zoom-label {
  min-width: 48px;
  text-align: center;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 850;
}
.confirm-box {
  position: relative;
  width: min(420px, calc(100vw - 36px));
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(24,31,53,0.98), rgba(11,16,32,0.98));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
}
.confirm-box h3 { margin: 0 0 8px; font-size: 22px; }
.confirm-box p { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.detail-image-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.image-card { margin: 0; border-radius: 16px; overflow: hidden; }
.image-card img, .detail-image-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.image-card figcaption { padding: 12px; display: grid; gap: 8px; }
.stack-form { display: grid; gap: 15px; }
.stack-form label { display: grid; gap: 8px; font-weight: 750; }
.help { color: var(--muted); font-size: 12px; line-height: 1.4; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.two-col { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.error-box { border-radius: 14px; padding: 12px 14px; color: #fecaca; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }
.hidden-field { display: none; }
.login-panel, .form-panel { width: min(880px, 100%); margin: 0 auto; }
.login-modal-page {
  position: relative;
  min-height: calc(100vh - 138px);
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vh, 58px) 0;
  isolation: isolate;
}
.login-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 20%, rgba(167,139,250,0.20), transparent 34%),
    radial-gradient(circle at 72% 78%, rgba(34,197,94,0.09), transparent 28%);
  filter: blur(1px);
  opacity: .9;
}
.login-dialog {
  width: min(390px, calc(100vw - 42px));
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(20,25,45,0.94), rgba(8,11,22,0.90));
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 28px 90px rgba(0,0,0,0.46);
  backdrop-filter: blur(22px);
}
.login-dialog-head { margin-bottom: 18px; }
.login-dialog h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.05em;
}
.login-dialog .muted { margin-top: 5px; font-size: 13px; }
.login-form { gap: 13px; }
.login-form label { color: #dbe4ff; font-size: 13px; }
.login-form input {
  height: 46px;
  border-radius: 15px;
  background: rgba(255,255,255,0.055);
}
.login-error { margin-bottom: 14px; padding: 10px 12px; }
.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.login-cancel, .login-submit { width: 100%; min-height: 44px; }
.simple-form-panel { padding: 22px; }
.upload-first-form { gap: 14px; }
.upload-first-form .optional-meta-block {
  display: grid;
  gap: 13px;
  margin-top: 4px;
  opacity: .92;
}
.upload-first-form textarea[name="prompt_text"] {
  min-height: 86px;
  resize: vertical;
}
.upload-field {
  border: 1px dashed rgba(167,139,250,0.36);
  border-radius: 22px;
  padding: 16px;
  background: rgba(167,139,250,0.045);
  transition: border-color .18s ease, background .18s ease;
}
.upload-field-primary {
  min-height: clamp(190px, 28vh, 310px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: clamp(26px, 5vw, 48px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(167,139,250,0.18), transparent 48%),
    rgba(167,139,250,0.055);
  cursor: pointer;
  text-align: center;
}
.upload-title {
  display: block;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.04em;
}
.upload-field-primary input {
  width: min(520px, 100%);
  padding: 14px;
  background: rgba(255,255,255,0.06);
}
.upload-field.dragging { border-color: rgba(34,197,94,0.8); background: rgba(34,197,94,0.08); }
.privacy-toggle {
  grid-template-columns: auto 1fr;
  align-items: start;
  border: 1px solid rgba(251,191,36,0.22);
  border-radius: 18px;
  padding: 14px;
  background: rgba(251,191,36,0.055);
}
.privacy-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: #f59e0b; }
.privacy-toggle span { display: grid; gap: 4px; }
.privacy-toggle small { color: var(--muted); font-weight: 500; line-height: 1.45; }
.upload-field input { border-radius: 14px; }
.upload-hint { color: #d8d4ff; font-size: 13px; }
.upload-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.upload-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.upload-preview-card { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.upload-preview-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.upload-preview-card figcaption { padding: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-remove { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; padding: 0; background: rgba(0,0,0,0.56); border-color: rgba(255,255,255,0.18); }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; padding: 10px; border-radius: 999px; background: rgba(8,11,22,0.74); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); width: fit-content; }

@media (max-width: 1180px) {
  .gallery-masonry { grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); }
  .showcase-stage { inset-left: min(40vw, 460px); }
  .living-mosaic { grid-template-columns: 1.2fr 1fr 1fr; }
  .mosaic-large { grid-column: span 1; }
}
@media (max-width: 820px) {
  .gallery-masonry { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }
  .showcase-hero {
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 14px;
    padding: 30px 16px 20px;
    border-radius: 26px;
  }
  .showcase-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: min(62vh, 620px);
    border-radius: 24px;
  }
  .showcase-stage img {
    object-fit: contain;
    object-position: center center !important;
    transform: none;
    animation: none;
  }
  .showcase-hero.is-switching .showcase-stage img { transform: none; }
  .showcase-copy {
    width: 100%;
    min-height: 0;
    padding: 38px 2px 0;
    justify-content: flex-start;
  }
  .showcase-copy .eyebrow { font-size: 13px; letter-spacing: .28em; }
  .showcase-copy h1 { font-size: clamp(26px, 8vw, 40px); max-width: 92%; line-height: 1.04; letter-spacing: -0.055em; }
  .showcase-actions { gap: 8px; margin-top: 18px; }
  .showcase-detail, .showcase-toggle { min-height: 42px; padding: 10px 18px; font-size: 14px; border-radius: 999px; }
  .showcase-toggle { min-width: 74px; }
  .showcase-subtitle { max-width: 94%; margin-top: 12px; font-size: 13px; }
  .showcase-meta {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 2px 2px 0;
    font-size: 11px;
  }
  .showcase-nav {
    top: calc(38px + 104px + min((100vw - 62px) * .625, 31vh));
    bottom: auto;
    width: 38px;
    height: 52px;
    font-size: 32px;
  }
  .living-mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .mosaic-large { grid-row: span 2; grid-column: span 2; }
  .mosaic-head { align-items: start; flex-direction: column; }
}
@media (max-width: 720px) {
  .corner-login, .corner-auth { top: 10px; left: 10px; }
  .showcase-hero { gap: 12px; padding: 26px 14px 18px; }
  .showcase-stage { aspect-ratio: 4 / 5; max-height: min(58vh, 560px); }
  .showcase-copy { padding: 30px 0 0; }
  .showcase-copy .eyebrow { font-size: 11px; letter-spacing: .24em; }
  .showcase-copy h1 { font-size: clamp(24px, 7.2vw, 34px); max-width: 92%; }
  .showcase-detail, .showcase-toggle { min-height: 38px; padding: 9px 16px; font-size: 13px; }
  .showcase-actions { margin-top: 16px; }
  .showcase-nav { top: calc(34px + 96px + min((100vw - 46px) * .625, 29vh)); width: 34px; height: 48px; font-size: 30px; }
  .detail-floating-actions { top: 10px; right: 10px; gap: 5px; }
  .detail-back-link, .detail-mini-action { min-width: 0; padding: 7px 9px; font-size: 12px; }
  .corner-auth { gap: 4px; opacity: .42; }
  .corner-login, .corner-auth-link, .corner-auth-primary { min-height: 26px; padding: 6px 8px; font-size: 11px; }
  .two-col { grid-template-columns: 1fr; }
  .wrap { width: min(1280px, calc(100vw - 18px)); margin-top: 0; }
  .detail-head { flex-direction: column; }
  .gallery-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-card { margin-bottom: 0; }
  .gallery-cover { border-radius: 20px; }
  .hero-image { border-radius: 22px; }
  .immersive-stage { min-height: calc(100vh - 190px); border-radius: 24px; }
  .immersive-stage .hero-main-button { width: calc(100vw - 88px); height: min(68vh, 640px); max-width: calc(100% - 86px); }
  .immersive-stage .hero-main-img { width: auto; max-width: 100%; max-height: 100%; }
  .viewer-top-overlay { top: 12px; left: 52px; right: 52px; gap: 6px; font-size: 10px; opacity: .58; }
  .viewer-top-overlay span:first-child { display: none; }
  .viewer-reset-toggle, .viewer-zoom-label { min-height: 24px; padding: 5px 8px; font-size: 11px; }
  .viewer-bottom-overlay { left: 12px; right: 12px; bottom: 12px; align-items: end; }
  .viewer-caption-stack { max-width: min(76vw, 360px); gap: 8px; }
  .viewer-title-block h1 { font-size: clamp(22px, 8vw, 34px); }
  .viewer-play-toggle { min-width: 94px; padding: 8px 10px; font-size: 12px; }
  .viewer-progress { gap: 9px; padding: 8px 10px; font-size: 12px; }
  .viewer-dots { max-width: 38vw; gap: 5px; }
  .viewer-dot { width: 6px; height: 6px; min-width: 6px; }
  .viewer-dot.active { width: 17px; }
  .hero-main-img { max-height: 100%; width: auto; max-width: 100%; }
  .hero-switch { width: 40px; height: 52px; font-size: 34px; }
  .hero-switch-prev { left: 8px; }
  .hero-switch-next { right: 8px; }
  .prompt-card-panel { padding: 16px; border-radius: 22px; }
  .prompt-card-head { align-items: flex-start; flex-direction: column; }
  .prompt-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .lightbox { padding: 8px; }
  .lightbox-shell { width: 100vw; height: 92vh; padding: 66px 48px 48px; }
  .lightbox-toolbar { top: 10px; left: 10px; gap: 5px; padding: 5px; }
  .lightbox-tool { min-width: 32px; height: 32px; padding: 0 9px; font-size: 14px; }
  .lightbox-fit { min-width: 46px; font-size: 12px; }
  .lightbox-zoom-label { min-width: 42px; font-size: 12px; }
  .lightbox-close { right: 10px; top: 10px; }
  .lightbox-nav { width: 40px; height: 56px; font-size: 34px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-viewport { width: 100%; height: 100%; border-radius: 16px; }
  .lightbox-viewport img { max-width: 90%; max-height: min(84%, calc(92vh - 178px)); }
  .manage-image-list { grid-template-columns: 1fr; }
  .sticky-actions { width: 100%; justify-content: center; border-radius: 22px; }
}
