/* =========================
 * 基础重置 & 全局
 * ========================= */
 * {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    background: #ffffff;
    color: #222;
    font-family:
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      Roboto,
      Helvetica,
      Arial,
      sans-serif;
    line-height: 1.5;
  }

/* =========================
 * Header
 * ========================= */
 .gallery-header-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #ffffff;
    border-bottom: 1px solid #eee;
  }
  
  .gallery-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
  
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .gallery-header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #222;
  }
  
  .gallery-header-actions {
    display: flex;
    gap: 12px;
  }
  
  .gallery-header-btn {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
  
    font-size: 14px;
    text-decoration: none;
    color: #333;
  
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
  
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  
  .gallery-header-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
  }
  
  /* 主按钮（人格 OS） */
  .gallery-header-btn.primary {
    background: #222;
    color: #fff;
    border-color: #222;
  }
  
  .gallery-header-btn.primary:hover {
    background: #000;
    border-color: #000;
  }
  

/* =========================
 * 页面结构
 * ========================= */
 .gallery-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
  }
  
  .gallery-header {
    margin-bottom: 24px;
  }
  
  .gallery-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
  }
  
  .gallery-subtitle {
    margin-top: 4px;
    color: #666;
    font-size: 14px;
  }
  
/* =========================
 * 控制区
 * ========================= */
 .gallery-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
  }
  
  .gallery-search-input,
  .gallery-sort-select {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #222;
  }
  
  .gallery-search-input {
    flex: 1;
  }
  
  .gallery-search-input:focus,
  .gallery-sort-select:focus {
    outline: none;
    border-color: #999;
  }

  .gallery-card {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
  }

/* =========================
 * 图片网格
 * ========================= */
 .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
  
  
  /* 图片容器逻辑 */
  .gallery-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;   /* ← 你可以改 */
    object-fit: cover;
    display: block;
    border-radius: 8px;
    background: #f2f2f2;
  }

  .gallery-card:hover .gallery-thumb {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  }
  
/* =========================
 * Modal
 * ========================= */
.gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}

.gallery-modal-image-wrap {
    background: #f6f6f6;
    padding: 12px;
    border-radius: 12px;
  }
  
  .gallery-modal-image-wrap img {
    width: 100%;
    border-radius: 8px;
    display: block;
  }

  /* =========================
 * 详情头部
 * ========================= */
.gallery-modal-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .gallery-modal-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
  }
  
  .gallery-modal-meta {
    font-size: 13px;
    color: #777;
  }

  .gallery-modal-desc {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
  }
  
  .gallery-modal-tags {
    margin-top: 4px;
  }
  
  .gallery-tag-pill {
    background: #f2f2f2;
    color: #555;
  }
  

.gallery-modal.active {
  display: block;
}

.gallery-modal-content {
  background: #fff;
  max-width: 720px;
  margin: 6vh auto;
  padding: 24px;
  border-radius: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
}

/* =========================
 * 空态
 * ========================= */
 .gallery-empty {
    margin-top: 48px;
    text-align: center;
    color: #888;
    font-size: 14px;
  }
  
  .stage-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
  }

  .stage-modal.active {
    display: flex;
  }

  .stage-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
  }

  .stage-modal-content {
    position: relative;
    z-index: 1;
    width: min(920px, 100% - 32px);
    max-height: calc(100vh - 80px);
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    background: rgba(10, 12, 18, 0.98);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7);
    padding: 18px 18px 20px;
    overflow: hidden;
  }

  .stage-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 3.2fr) minmax(0, 3.8fr);
    gap: 16px;
    align-items: flex-start;
  }

  .stage-modal-image-wrap {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
    max-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .stage-modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  .stage-modal-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
  }

  .stage-modal-desc {
    font-size: 13px;
    color: var(--text-subtle);
    margin: 0 0 10px;
  }

  .stage-modal-meta {
    margin: 0 0 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px 16px;
    font-size: 12px;
  }

  .stage-modal-meta dt {
    font-weight: 500;
    color: var(--text-subtle);
  }

  .stage-modal-meta dd {
    margin: 0;
    color: var(--text-main);
    word-break: break-all;
  }

  .stage-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .stage-tag-pill {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 2px 8px;
    font-size: 11px;
  }

  .stage-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
  }

  .stage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
  }

  .stage-btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
  }

  .stage-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }

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

  .stage-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    color: var(--text-subtle);
    font-size: 20px;
    cursor: pointer;
  }

  .stage-modal-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .stage-modal-status-note {
    font-size: 11px;
    color: var(--text-subtle);
  }

  .stage-modal-message {
    font-size: 12px;
    color: var(--text-subtle);
    margin-top: 6px;
  }