/* 芯创工坊 文件工作台 — 简洁高对比样式表 */

:root {
  --ink: #1b1a17;
  --ink-soft: #3c3a35;
  --muted: #65615a;
  --paper: #f1efea;
  --paper-2: #e9e6df;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --line: #e0dbd1;
  --line-strong: #cfc9bd;
  --accent: #16140f;
  --accent-soft: #2e2b25;
  --danger: #b3392c;
  --ok: #2f7d4f;
  --warn: #b6822a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 18, 14, 0.06), 0 2px 8px rgba(20, 18, 14, 0.05);
  --shadow: 0 8px 28px rgba(20, 18, 14, 0.1);
  --shadow-lg: 0 24px 64px rgba(20, 18, 14, 0.22);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 50% -10%, #ffffff 0%, transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.case-detail-scroll-lock {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 72px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: 0.01em; }
.brand-divider { width: 1px; height: 16px; background: var(--line-strong); }
.brand-subtitle { color: var(--muted); font-size: 13px; }

.nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border-radius: var(--radius-pill);
}

/* ---------- 按钮 ---------- */
button, .button-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
button:hover { color: var(--ink); }

.tab-button { font-size: 14px; }
.tab-button.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.primary:hover { background: var(--accent-soft); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.ghost {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
}
.ghost:hover { border-color: var(--ink-soft); }

.danger {
  background: #fff;
  border-color: var(--danger);
  color: var(--danger);
}
.danger:hover { background: var(--danger); color: #fff; }

button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 通用面板 / 表单 ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }

.muted { color: var(--muted); font-size: 13px; }

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 14px;
}
.panel > label:first-of-type,
form > label:first-of-type { margin-top: 16px; }

input, textarea, select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-weight: 500;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
input::placeholder, textarea::placeholder { color: #a39e94; }
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 20, 15, 0.08);
}

form button[type="submit"] { margin-top: 16px; }

.message {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  color: var(--muted);
}
.message[data-tone="success"] { color: var(--ok); }
.message[data-tone="error"] { color: var(--danger); }
.message[data-tone="busy"], .message[data-tone="ready"] { color: var(--warn); }

/* ---------- 登录区 ---------- */
.login-only,
.admin-login-hero {
  display: grid;
  place-items: start center;
  min-height: min(64vh, 520px);
  padding: 32px 0;
}
.login-only .panel,
.admin-login-hero .panel { width: min(440px, 100%); }

/* ---------- 上传工作区 ---------- */
#uploadWorkspace { display: grid; gap: 20px; }

.client-number {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
}
.client-number .kicker { color: rgba(255, 255, 255, 0.7); }
.client-number strong { display: block; font-size: 26px; font-weight: 800; margin: 4px 0 6px; }
.client-number .muted { color: rgba(255, 255, 255, 0.78); }

.upload-area {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 200px;
  text-align: center;
  background: var(--panel-2);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 24px;
  margin: 0;
  transition: border-color 140ms ease, background 140ms ease;
}
.drop:hover { border-color: var(--ink-soft); }
.drop.dragging { border-color: var(--accent); background: #fff; }
.drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.drop-placeholder { display: grid; gap: 6px; pointer-events: none; }
.drop-placeholder strong { font-size: 17px; font-weight: 700; }
.drop-preview { display: grid; gap: 10px; justify-items: center; pointer-events: none; }
.drop-preview img {
  max-height: 220px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.drop-preview span { font-size: 13px; color: var(--muted); }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
.stat-card strong { display: block; font-size: 28px; font-weight: 800; }
.stat-card .muted { margin-top: 2px; }

/* ---------- 后台布局 ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.toolbar { position: sticky; top: 84px; }

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.project-grid { display: grid; gap: 14px; }

.project-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.project-card .project-head { margin-bottom: 12px; }
.project-card .project-head button { padding-left: 0; font-weight: 700; }

.project-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
  font-size: 13px;
  color: var(--muted);
}
.project-meta b { color: var(--ink); font-weight: 600; }

.project-files { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.project-form { margin-top: 16px; }
.project-actions { display: flex; gap: 10px; margin-top: 16px; }

.status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.status-pending { background: #fbf2dd; color: #8a6516; border-color: #ecd9a8; }
.status-working { background: #e2ecfb; color: #2a558f; border-color: #c2d6f3; }
.status-done { background: #def0e4; color: #246b41; border-color: #bbe0c6; }

/* ---------- 文件卡 ---------- */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.file-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  display: grid;
  gap: 8px;
}
.image-shell {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4 / 3;
}
.image-shell img { width: 100%; height: 100%; object-fit: cover; }
.file-card h4 { font-size: 14px; font-weight: 700; }
.file-card p { font-size: 13px; color: var(--muted); }

.file-meta { display: grid; gap: 4px; margin: 0; font-size: 12px; }
.file-meta div { display: flex; justify-content: space-between; gap: 8px; }
.file-meta dt { color: var(--muted); }
.file-meta dd { margin: 0; font-weight: 600; }

.file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.file-actions a {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
}
.file-actions a:hover { border-color: var(--ink-soft); }

.file-remark-form { margin: 0; }
.file-remark-form label { margin-top: 0; }
.saved-pulse { animation: savedPulse 0.9s ease; }
@keyframes savedPulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 125, 79, 0.4); }
  100% { box-shadow: 0 0 0 10px rgba(47, 125, 79, 0); }
}

/* ---------- 案例展示区 ---------- */
.case-section { display: grid; gap: 20px; }

.case-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.case-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.case-toolbar button {
  min-height: 36px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink-soft);
}
.case-toolbar button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.split-actions { display: flex; gap: 8px; }

.case-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 20px;
}
.case-grid-empty { grid-column: 1 / -1; text-align: center; padding: 32px 0; }

.case-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.case-card-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
}
.case-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}
.case-card:hover .case-card-media img { transform: scale(1.04); }
.image-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--paper-2) 30%, #fff 50%, var(--paper-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.image-ready .image-skeleton { display: none; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.case-card-cursor {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20, 18, 14, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.case-card:hover .case-card-cursor { opacity: 1; transform: translateX(-50%) translateY(0); }

.case-card-caption { padding: 14px 16px 16px; display: grid; gap: 4px; }
.case-card-caption h3 { font-size: 15px; font-weight: 700; }
.case-card-caption small { color: var(--muted); font-size: 12px; }
.case-tag {
  align-self: start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-soft);
  background: var(--paper-2);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.case-skeleton .case-card-media { background: var(--paper-2); }
.case-skeleton .case-card-caption span,
.case-skeleton .case-card-caption strong {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--paper-2);
}
.case-skeleton .case-card-caption strong { width: 70%; height: 16px; }

.case-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 72px 24px;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.case-empty strong { font-size: 18px; font-weight: 700; }
.case-empty span { color: var(--muted); }

/* ---------- 案例管理 ---------- */
.case-management-section { display: grid; gap: 18px; }
.case-unlock { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.case-unlock label { margin-top: 0; flex: 1; min-width: 220px; }

.case-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.case-create-form .wide { grid-column: 1 / -1; }

.case-category-manager {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.case-category-create { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.case-category-create label { margin-top: 0; flex: 1; min-width: 220px; }
.case-category-list { display: grid; gap: 10px; }
.case-category-row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.case-category-row label { margin-top: 0; flex: 1; min-width: 180px; }
.case-category-row label span { color: var(--muted); font-weight: 600; }
.case-category-count { font-size: 13px; color: var(--muted); align-self: center; }

.case-edit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.case-edit-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.case-edit-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.case-edit-form { padding: 16px 18px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.case-edit-form .wide { grid-column: 1 / -1; }
.case-edit-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ---------- 案例详情弹层 ---------- */
.case-detail-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 240ms ease;
}
.case-detail-layer.is-open { opacity: 1; }
.case-detail-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 0;
  background: rgba(20, 18, 14, 0.55);
  cursor: pointer;
}
.case-detail-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 240ms ease;
}
.case-detail-layer.is-open .case-detail-card { transform: none; }
.case-detail-media { background: var(--paper-2); }
.case-detail-media img { width: 100%; height: 100%; object-fit: contain; max-height: calc(100vh - 48px); }
.case-detail-copy { padding: 28px; overflow-y: auto; display: grid; gap: 10px; align-content: start; }
.case-detail-copy h2 { font-size: 22px; }
.case-detail-copy p { color: var(--ink-soft); }
.case-detail-copy > .ghost { justify-self: end; }
.case-detail-copy dl { display: grid; gap: 8px; margin: 4px 0 0; }
.case-detail-copy dl div { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; }
.case-detail-copy dt { color: var(--muted); font-size: 13px; }
.case-detail-copy dd { margin: 0; font-weight: 600; }
.case-detail-spacer { height: 2px; }

.case-original-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel-2);
}
.case-original-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.case-original-card img { width: 100%; max-height: 220px; object-fit: cover; }
.case-original-empty { padding: 24px; display: grid; gap: 4px; justify-items: center; text-align: center; color: var(--muted); }
.case-original-empty b { color: var(--ink); }

/* ---------- 动画 / 加载 ---------- */
.reveal-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-item.is-visible { opacity: 1; transform: none; }

.is-submitting { opacity: 0.7; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, .reveal-item, .case-card, .case-detail-card { transition: none !important; animation: none !important; }
  .reveal-item { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .toolbar { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .case-detail-card { grid-template-columns: 1fr; }
  .case-detail-media img { max-height: 42vh; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { flex-direction: column; gap: 12px; border-radius: var(--radius); }
  .nav { width: 100%; justify-content: space-between; }
  .tab-button { flex: 1; padding: 0 8px; }
  .case-control-bar { flex-direction: column; align-items: stretch; }
  .split-actions { justify-content: stretch; }
  .split-actions button { flex: 1; }
  .case-create-form,
  .case-edit-form { grid-template-columns: 1fr; }
  .project-meta { grid-template-columns: 1fr; }
}

/* ====================================================================
   案例 3D 旋转舞台（PC 端「3D 旋转 / 网格」可切换；移动端隐藏，仅网格）
   样式复原自旧版半透明景深风格，与上方高对比网格视图相互独立。
   ==================================================================== */

/* —— 视图切换分段控件（仅 PC 显示，860px 以下隐藏） —— */
.case-view-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--panel);
  overflow: hidden;
}
.case-view-toggle button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
}
.case-view-toggle button.active {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 860px) {
  .case-view-toggle { display: none; }
  .case-stage { display: none !important; }
}

/* —— 舞台容器 —— */
.case-stage {
  --scene-rx: 0deg;
  --scene-ry: 0deg;
  --scene-pan-x: 0px;
  --scene-pan-y: 0px;
  position: relative;
  height: clamp(420px, 62vh, 600px);
  overflow: hidden;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(16, 16, 16, 0.026) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 16, 16, 0.018) 1px, transparent 1px),
    linear-gradient(145deg, #fbfaf7 0%, #f1efea 48%, #ffffff 100%);
  background-size: 116px 116px, 116px 116px, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 42px 130px rgba(16, 16, 16, 0.12);
  perspective: 1800px;
  isolation: isolate;
}
.case-stage::before {
  content: "";
  position: absolute;
  inset: -12% -8% auto -8%;
  height: 54%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 1;
}
.case-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8%;
  background: linear-gradient(0deg, rgba(242, 240, 235, 0.72), rgba(242, 240, 235, 0));
  pointer-events: none;
  z-index: 4;
}
.case-stage-copy {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: rgba(16, 16, 16, 0.62);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
}
.case-stage-copy span {
  min-width: 116px;
  padding: 14px 16px;
  border-right: 1px solid rgba(16, 16, 16, 0.08);
}
.case-stage-copy span:last-child {
  border-right: 0;
  color: rgba(16, 16, 16, 0.34);
}
.case-stage .case-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  transform-style: preserve-3d;
  padding: 0;
}

/* —— 单张图片平面 —— */
.case-plane {
  --natural-ratio: 0.75;
  --plane-w: 420px;
  --plane-opacity: 0.84;
  --plane-index: 1;
  --depth-blur: 0px;
  --depth-tone: 0.94;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: var(--plane-index);
  width: clamp(260px, var(--plane-w), min(720px, 62vw));
  aspect-ratio: var(--natural-ratio);
  overflow: visible;
  border: 1px solid rgba(16, 16, 16, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  opacity: var(--plane-opacity);
  box-shadow:
    0 24px 70px rgba(16, 16, 16, 0.12),
    0 4px 18px rgba(16, 16, 16, 0.07);
  filter: saturate(var(--depth-tone)) contrast(0.98) blur(var(--depth-blur));
  transform: translate3d(-50%, -50%, 0);
  transform-style: preserve-3d;
  transform-origin: center center;
  transition:
    opacity 300ms var(--ease-soft),
    filter 260ms var(--ease-soft),
    transform 420ms var(--ease-out),
    border-color 220ms var(--ease-soft),
    box-shadow 220ms var(--ease-soft);
}
.case-stage.is-dragging { cursor: grabbing; }
.case-stage.is-dragging .case-plane {
  transition:
    opacity 90ms linear,
    filter 90ms linear,
    border-color 120ms linear,
    box-shadow 120ms linear;
  will-change: transform, opacity;
}
.case-plane.is-behind { pointer-events: auto; }
.case-plane.is-orbit-hidden { pointer-events: none; }
.case-plane.is-active,
.case-plane.is-hovered,
.case-plane:hover {
  border-color: rgba(16, 16, 16, 0.28);
  --depth-blur: 0px;
  --depth-tone: 1.02;
  box-shadow:
    0 44px 140px rgba(16, 16, 16, 0.22),
    0 10px 38px rgba(16, 16, 16, 0.12);
  will-change: transform, opacity;
}

/* —— 平面内的图片 —— */
.case-plane .case-media,
.case-plane .case-media:hover,
.case-plane .case-media:focus-visible {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  transform: none;
  cursor: zoom-in;
}
.case-plane .case-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 14%, transparent 86%, rgba(16, 16, 16, 0.14)),
    linear-gradient(0deg, rgba(16, 16, 16, 0.18), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.18));
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.48;
}
.case-plane.is-active .case-media::after,
.case-plane.is-hovered .case-media::after,
.case-plane:hover .case-media::after { opacity: 0.18; }
.case-plane .case-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(0.95);
  transition:
    opacity 520ms var(--ease-soft),
    transform 780ms var(--ease-out),
    filter 360ms var(--ease-soft);
}
.case-plane .case-media.image-ready img {
  opacity: 1;
  transform: scale(1);
}
.case-plane.is-active .case-media img,
.case-plane.is-hovered .case-media img,
.case-plane:hover .case-media img {
  transform: scale(1.02);
  filter: saturate(1.04) contrast(1.02);
}
.case-plane .case-cursor {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(23, 21, 18, 0.1);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms var(--ease-out);
  backdrop-filter: blur(12px);
}
.case-plane.is-active .case-cursor,
.case-plane.is-hovered .case-cursor,
.case-plane:hover .case-cursor {
  opacity: 1;
  transform: translateY(0);
}

/* —— 平面标题卡片 —— */
.case-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 8px;
  border: 1px solid rgba(16, 16, 16, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
  pointer-events: none;
  box-shadow: 0 18px 48px rgba(16, 16, 16, 0.12);
  backdrop-filter: blur(16px);
}
.case-plane.is-active .case-caption,
.case-plane.is-hovered .case-caption,
.case-plane:hover .case-caption {
  opacity: 1;
  transform: translateY(0);
}
.case-caption .case-number {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(16, 16, 16, 0.1);
  font-size: 12px;
  font-weight: 850;
}
.case-caption .case-tag {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-caption h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(18px, 1.35vw, 25px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.case-caption small {
  grid-column: 1 / -1;
  color: rgba(16, 16, 16, 0.54);
  font-size: 11px;
}

/* —— 舞台交互态 —— */
.case-orbit-stage {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

/* 密码管理 / 默认密码告警（上线前安全加固，2026-06-20 加） */
.default-pw-banner {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--warn);
  border-radius: 12px;
  background: #fdf6e8;
  color: #7a5715;
  font-size: 14px;
}
.admin-password-panel,
.client-password-panel {
  margin-bottom: 18px;
}
.admin-password-panel > summary,
.client-password-panel > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
}
.admin-password-panel > summary::-webkit-details-marker,
.client-password-panel > summary::-webkit-details-marker { display: none; }
.admin-password-panel > summary::before,
.client-password-panel > summary::before { content: "🔑 "; }
.admin-password-panel[open] > summary,
.client-password-panel[open] > summary { margin-bottom: 12px; }
.admin-password-panel form,
.client-password-panel form { display: grid; gap: 12px; max-width: 360px; }

/* 主页页脚版权信息（2026-06-20 加） */
.site-footer {
  margin-top: 40px;
  padding: 28px 16px 36px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.site-footer .footer-brand {
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .footer-sep { margin: 0 6px; color: var(--line-strong); }

/* 更新说明（changelog）—— 复用 case-detail-layer 遮罩，仅定制内容卡片（2026-06-20 加） */
.footer-changelog { margin-top: 10px; }
.footer-changelog button {
  position: relative;
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}
.footer-changelog button:hover { color: var(--ink); }
.changelog-dot {
  position: absolute;
  top: -3px;
  right: -8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}
.changelog-card {
  grid-template-columns: 1fr;
  max-width: 540px;
  width: min(92vw, 540px);
}
.changelog-body {
  padding: 28px;
  overflow-y: auto;
  max-height: calc(100vh - 64px);
  display: grid;
  gap: 22px;
  align-content: start;
}
.changelog-body > h2 { font-size: 22px; }
.changelog-entry-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.changelog-version { font-weight: 700; color: var(--ink); }
.changelog-date { font-size: 12px; color: var(--muted); }
.changelog-entry ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.changelog-entry li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.changelog-entry li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
