  :root {
    --bg: #0e0f13;
    --card: #1a1d24;
    --card-hover: #22262f;
    --border: #2a2f3a;
    --text: #e6e8ee;
    --text-dim: #9ba3b4;
    --danger: #ff4d4f;
    --danger-soft: rgba(255, 77, 79, 0.12);
    --warn: #ffaa33;
    --accent: #5b8def;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
                 "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  html { background-color: var(--bg); } /* fallback when bg is off */
  body { padding: 0 0 64px 0; position: relative; min-height: 100vh;
         background: transparent; } /* let ::before show through */

  /* Bing daily wallpaper background.
     Uses a fixed full-viewport layer behind everything; a soft dark overlay
     keeps card text readable. Toggle on/off via [data-bg="off"]. */
  body::before {
    content: '';
    position: fixed; inset: 0;
    background: var(--bg) center/cover no-repeat;
    background-image: var(--bg-image, none);
    z-index: -2;
    transition: background-image 0.6s ease-in-out;
  }
  body::after {
    content: '';
    position: fixed; inset: 0;
    background: linear-gradient(180deg, rgba(14,15,19,0.78) 0%, rgba(14,15,19,0.55) 100%);
    z-index: -1;
    pointer-events: none;
  }
  body[data-bg="off"]::before { display: none; }
  body[data-bg="off"]::after { display: none; }
  .bg-credit {
    position: fixed; right: 8px; bottom: 4px;
    font-size: 10px; color: rgba(255,255,255,0.35);
    padding: 2px 6px; border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    z-index: 1;
    max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    pointer-events: auto;
  }
  .bg-credit a { color: inherit; text-decoration: underline; }
  .bg-toggle {
    position: fixed; left: 10px; bottom: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(20,23,31,0.7); border: 1px solid var(--border);
    color: var(--text-dim); cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2; padding: 0; line-height: 1;
  }
  .bg-toggle:hover { color: var(--text); background: rgba(91,141,239,0.3); }

  /* Slightly translucent cards when bg is on, so the wallpaper peeks through */
  body:not([data-bg="off"]) .card { background: rgba(26,29,36,0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  body:not([data-bg="off"]) .toolbar,
  body:not([data-bg="off"]) .modal-card,
  body:not([data-bg="off"]) header.hero { background-color: rgba(20,23,31,0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

  /* Hero */

  /* Legacy .badge-origin kept as `display:none` for backward compat with
     cached HTML/JS. The new approach is a tiny icon embedded in the rank pill. */
  .badge-origin { display: none !important; }

  /* Origin marker baked into the rank pill (no extra row). */
  .rank {
    gap: 4px;
  }
  .rank .origin-mark {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1;
  }
  .rank.origin-imported .origin-mark { color: #ffc266; }
  .rank.origin-user      .origin-mark { color: #a3c2ff; }
  .rank.origin-admin     .origin-mark { color: #7ed957; }
  .sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(91, 141, 239, 0.08);
    color: #a3c2ff;
    border: 1px solid rgba(91, 141, 239, 0.2);
    border-radius: 999px;
    font-size: 11.5px;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .sync-indicator:hover { opacity: 0.85; }
  .sync-indicator .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #52c41a;
    box-shadow: 0 0 6px #52c41a;
  }
  .sync-indicator.idle .dot { background: #aaa; box-shadow: none; }
  .sync-indicator.error .dot { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
  .hero {
    position: relative;
    padding: 56px 24px 40px;
    text-align: center;
    background:
      radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 77, 79, 0.18) 0%, transparent 70%),
      linear-gradient(180deg, #14171f 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
  }
  .hero h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #ff4d4f 0%, #ff7a4d 60%, #ffaa33 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .hero .sub {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 20px;
  }
  .badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--danger-soft);
    color: #ff8086;
    border: 1px solid rgba(255, 77, 79, 0.35);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
  }
  .badge .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
  }

  /* Controls */
  .controls {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(14, 15, 19, 0.85);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
  }
  .search {
    flex: 1;
    min-width: 220px;
    max-width: 420px;
    position: relative;
  }
  .search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
  }
  .search input:focus { border-color: var(--danger); }
  .search::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: no-repeat center/contain
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239ba3b4' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7'/><path d='m20 20-3-3'/></svg>");
  }
  .filter-tabs { display: flex; gap: 8px; }
  .tab {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .tab:hover { color: var(--text); border-color: var(--text-dim); }
  .tab.active {
    background: var(--danger-soft);
    color: #ff8086;
    border-color: var(--danger);
  }
  .stats {
    color: var(--text-dim);
    font-size: 13px;
    padding: 0 4px;
  }
  .stats strong { color: var(--text); }
  .visit-stats {
    color: var(--text-dim);
    font-size: 12.5px;
    padding: 4px 10px;
    background: rgba(91, 141, 239, 0.08);
    border: 1px solid rgba(91, 141, 239, 0.2);
    border-radius: 999px;
    white-space: nowrap;
  }
  .visit-stats strong { color: #a3c2ff; font-weight: 600; }

  /* Submit button (right of stats) */
  .submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7a4d 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.25);
  }
  .submit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255, 77, 79, 0.4); }
  .submit-btn:active { transform: translateY(0); }
  .submit-btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
  .submit-btn .pulse {
    display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px #fff;
    animation: pulse 1.6s ease-in-out infinite;
  }

  /* 靠谱榜 sister-site link — companion to 红黑榜 */
  .kp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
    color: #0e0f13;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .kp-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(82, 196, 26, 0.5);
    color: #0e0f13;
  }
  .kp-link:active { transform: translateY(0); }
  .kp-link .kp-badge {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 2px;
    background: rgba(14,15,19,0.85);
    color: #95de64;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.6); }
  }

  /* Modal */
  .modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 150;
    padding: 40px 16px;
    overflow-y: auto;
  }
  .modal-bg.open { display: flex; }
  .modal {
    width: 100%;
    max-width: 560px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 28px 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    animation: modalIn 0.2s ease-out;
  }
  @keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .modal h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(90deg, #ff4d4f, #ffaa33);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .modal .desc {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 20px;
  }
  .field { margin-bottom: 14px; }
  .field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
  }
  .field label .req { color: var(--danger); font-weight: 800; }
  .field label .hint-inline { color: var(--text-dim); font-weight: 400; font-size: 12px; margin-left: 4px; }
  .field .counter {
    font-size: 11.5px;
    color: var(--text-dim);
    text-align: right;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
  }
  .field .counter.ok { color: var(--ok); font-weight: 600; }
  .field input.invalid,
  .field textarea.invalid,
  .field select.invalid { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(255,77,79,0.18); }
  .field input, .field textarea, .field select {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
  }
  .field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--danger);
  }
  .field textarea { min-height: 80px; resize: vertical; }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

  /* Drop zone */
  .drop-zone {
    position: relative;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: rgba(255,255,255,0.02);
  }
  .drop-zone:hover { border-color: var(--accent); }
  .drop-zone.over  { border-color: var(--danger); background: rgba(255,77,79,0.06); }
  .drop-zone .dz-icon { font-size: 28px; margin-bottom: 6px; }
  .drop-zone .dz-text { color: var(--text); font-size: 14px; font-weight: 500; }
  .drop-zone .dz-hint { color: var(--text-dim); font-size: 12px; margin-top: 4px; }

  /* Thumbs grid (modal) */
  .thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    margin-top: 10px;
  }
  .thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: var(--bg) center/cover no-repeat;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.15s;
  }
  .thumb.uploading { opacity: 0.6; }
  .thumb .progress {
    position: absolute; inset: auto 0 0 0; height: 3px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
  }
  .thumb .progress > i {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--accent), #7aaeff);
    width: 0%;
    transition: width 0.15s;
  }
  .thumb .x {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .thumb:hover .x { opacity: 1; }
  .thumb.done .x { opacity: 1; }
  .thumb .err {
    position: absolute; inset: 0;
    background: rgba(255,77,79,0.85);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; padding: 6px;
    text-align: center;
  }
  .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }
  .btn:hover { background: rgba(255,255,255,0.05); }
  .btn-primary {
    background: linear-gradient(135deg, #ff4d4f, #ff7a4d);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(255,77,79,0.25);
  }
  .btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, #ff4d4f, #ff7a4d); }
  .btn-primary[disabled] { opacity: 0.55; cursor: not-allowed; filter: none; }
  .pending-note {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(255,170,51,0.08);
    border: 1px solid rgba(255,170,51,0.3);
    border-radius: 8px;
    color: #ffd56b;
    font-size: 12.5px;
    line-height: 1.5;
  }
  /* Consent checkbox row */
  .consent-row { margin: 12px 0 6px; }
  .consent-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    color: #c0c5cf;
    line-height: 1.55;
    cursor: pointer;
  }
  .consent-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #ffaa33;
    cursor: pointer;
  }
  .consent-label strong { color: #e6e8ee; }
  .consent-label:hover { color: #e6e8ee; }
  /* Honeypot: visually + a11y hidden; bots still see and fill it. */
  .hp-trap {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
  }

  /* Toast */
  .toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .toast.success { border-color: rgba(82, 196, 26, 0.5); color: #b7eb8f; }
  .toast.error { border-color: var(--danger); color: #ff8086; }

  /* Grid */
  .container {
    max-width: 1280px;
    margin: 28px auto 0;
    padding: 0 20px;
  }
  .grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 18px 16px;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
  }
  .card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 77, 79, 0.4);
    box-shadow: 0 8px 32px rgba(255, 77, 79, 0.12);
  }
  .card::before {
    content: "";
    position: absolute;
    left: 0; top: 18px; bottom: 18px;
    width: 3px;
    background: var(--danger);
    border-radius: 0 3px 3px 0;
    opacity: 0.7;
  }
  .card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
  }
  .rank {
    flex-shrink: 0;
    min-width: 28px;
    max-width: 80px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--danger-soft);
    color: #ff8086;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.3px;
  }
  .company {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
  }
  .company-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--border);
  }
  .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
  }
  .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-dim);
  }
  .meta-item.area { color: #ffd56b; border-color: rgba(255, 170, 51, 0.3); background: rgba(255, 170, 51, 0.08); }
  .meta-item.contact { color: var(--accent); border-color: rgba(91, 141, 239, 0.3); background: rgba(91, 141, 239, 0.08); }
  .meta-item.recorded { color: #9ea4b3; border-color: rgba(158,164,179,0.25); background: rgba(158,164,179,0.06); }
  .meta-item.label { font-weight: 500; }
  .note {
    color: #c9ccd5;
    font-size: 13.5px;
    line-height: 1.65;
    margin: 10px 0 4px;
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: -webkit-line-clamp 0s;
  }
  .note.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
  }
  .note-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 10px;
    padding: 4px 10px;
    background: rgba(91, 141, 239, 0.10);
    border: 1px solid rgba(91, 141, 239, 0.25);
    border-radius: 999px;
    color: #a3c2ff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .note-toggle:hover { background: rgba(91, 141, 239, 0.18); }
  .note-toggle::after { content: "↓"; transition: transform 0.2s; }
  .note-toggle.expanded::after { transform: rotate(180deg); }
  .note-toggle[hidden] { display: none !important; }
  .evidence {
    margin-top: 10px;
  }
  .evidence-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
  }
  .evidence-label .count {
    background: var(--danger-soft);
    color: #ff8086;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
  }
  .thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    /* Cap to ~1 row (thumb 96px + gap 6px ≈ 102px). Extra thumbs are
       summarized as a "+N" overlay (see .thumb-more). */
    max-height: 102px;
    overflow: hidden;
  }
  .thumb {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    background: #0a0c10 center/cover no-repeat;
    cursor: zoom-in;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
    display: block;
  }
  .thumb:hover { transform: scale(1.04); border-color: var(--danger); }
  /* Pending lazy-load: faint shimmer so cards look alive while waiting */
  .thumb[data-bg] {
    background: linear-gradient(110deg, #14171f 8%, #1c2030 18%, #14171f 33%);
    background-size: 200% 100%;
    animation: thumbShimmer 1.4s linear infinite;
  }
  @keyframes thumbShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  /* "+N more" overlay for cards with >PREVIEW_THUMBS_MAX images */
  .thumb.thumb-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 23, 31, 0.85);
    color: #e6e8ee;
    font-size: 16px;
    font-weight: 700;
    border: 1px dashed var(--border);
    cursor: pointer;
  }
  .thumb.thumb-more span { letter-spacing: 0.5px; }
  .thumb.thumb-more:hover { background: rgba(91, 141, 239, 0.15); border-color: var(--accent); }

  /* Empty */
  .empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
  }
  .empty .emoji { font-size: 40px; margin-bottom: 12px; }

  /* Lightbox — 3-image carousel: prev / current / next side by side, sliding as a unit. */
  .lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    z-index: 100;
    cursor: zoom-out;
  }
  .lightbox.open { display: block; animation: lbFadeIn 0.2s ease-out; }
  @keyframes lbFadeIn { from { opacity: 0.65; } to { opacity: 1; } }
  .lightbox .lb-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px;
    overflow: hidden;
    pointer-events: none;
  }
  .lightbox .lb-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    /* Baseline: middle (current) image centered in the stage. */
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.34s cubic-bezier(.22, .8, .3, 1);
    will-change: transform;
    pointer-events: none;
  }
  .lightbox .lb-track.lb-dragging { transition: none; }
  .lightbox .lb-img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
  }
  .lightbox .close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(8px);
  }
  .lightbox .close:hover { background: rgba(255, 255, 255, 0.2); }
  /* Nav buttons live at the bottom of the screen, symmetric around the counter */
  .lightbox .lb-nav {
    position: absolute;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.15s, transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: none;
    z-index: 3;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .lightbox .lb-nav:hover { background: rgba(255, 255, 255, 0.22); }
  .lightbox .lb-nav:active { transform: scale(0.92); }
  .lightbox .lb-prev { left: 18px; }
  .lightbox .lb-next { right: 18px; }
  .lightbox.has-multi .lb-nav { display: flex; }
  /* (No more #lightboxImg — the 3-img stage handles all image rendering.) */
  .lightbox .lb-counter {
    position: absolute;
    bottom: 27px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    display: none;
    z-index: 3;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
  }
  .lightbox.has-multi .lb-counter { display: block; }

  /* Footer note */
  .footer {
    margin: 60px auto 0;
    max-width: 720px;
    text-align: center;
    color: var(--text-dim);
    font-size: 12.5px;
    padding: 0 20px;
    line-height: 1.7;
  }
  .footer strong { color: var(--warn); }
  .footer-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
    transition: color 0.15s, border-color 0.15s;
  }
  .footer-link:hover {
    color: #a3c2ff;
    border-bottom-style: solid;
  }

  /* Card type-specific accent */
  .card[data-type="合作靠谱"]::before { background: var(--warn); }

  @media (max-width: 600px) {
    .hero { padding: 36px 16px 28px; }
    .hero h1 { font-size: 24px; }
    .controls { padding: 12px 14px; }
    .container { padding: 0 14px; }
    .grid { grid-template-columns: 1fr; }
    .lightbox .lb-nav { width: 40px; height: 40px; font-size: 22px; bottom: 14px; }
    .lightbox .lb-prev { left: 12px; }
    .lightbox .lb-next { right: 12px; }
    .lightbox .lb-counter { bottom: 22px; font-size: 12px; padding: 4px 11px; }
    .lightbox .lb-stage { bottom: 70px; }
  }
