
    /* ============================================================
       Leowh Image Gallery — International Design System v2
       支持：壁纸 / 摄影 / 插画 / AI艺术
       ============================================================ */

    :root { --max-width: 1600px; }
    body {
      font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      background: var(--bg);
      color: var(--text-primary);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    main {
      flex: 1;
    }

    /* ======================
       1. HERO — Immersive
       ====================== */
    .hero {
      position: relative;
      width: 100%;
      height: 70vh;
      min-height: 460px;
      max-height: 750px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .hero__bg {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center;
      opacity: 0;
      transition: opacity 1.5s ease;
      will-change: opacity;
    }
    .hero__bg.is-active { opacity: 1; }
    .hero__gradient {
      position: absolute;
      inset: 0;
      background:
        linear-gradient(180deg,
          rgba(0,0,0,0.15) 0%,
          rgba(0,0,0,0.05) 30%,
          rgba(0,0,0,0.25) 70%,
          rgba(0,0,0,0.6) 100%
        );
    }
    .hero__inner {
      position: relative;
      z-index: 2;
      text-align: center;
      padding: 0 var(--gutter);
      max-width: 720px;
      width: 100%;
    }
    .hero__title {
      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 700;
      color: #fff;
      letter-spacing: -0.03em;
      line-height: 1.15;
      margin-bottom: 12px;
    }
    .hero__desc {
      font-size: clamp(0.9rem, 1.6vw, 1.1rem);
      color: rgba(255,255,255,0.75);
      font-weight: 300;
      line-height: 1.6;
      margin-bottom: 28px;
    }
    .hero__search-wrap {
      position: relative;
      max-width: 600px;
      margin: 0 auto;
    }
    .hero__search {
      display: flex;
      align-items: center;
      background: #fff;
      border-radius: var(--radius-full);
      padding: 5px 5px 5px 22px;
      box-shadow: 0 8px 40px rgba(0,0,0,0.2);
      transition: box-shadow var(--transition), transform var(--transition);
    }
    .hero__search:focus-within {
      box-shadow: 0 12px 50px rgba(0,0,0,0.3);
      transform: translateY(-1px);
    }
    .hero__search input {
      flex: 1;
      border: none;
      outline: none;
      font-size: 15px;
      font-weight: 400;
      background: transparent;
      color: var(--text-primary);
      min-width: 0;
    }
    .hero__search input::placeholder { color: var(--text-muted); font-weight: 300; }
    .hero__search-btn {
      flex-shrink: 0;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: transparent;
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
      white-space: nowrap;
    }
    .hero__search-btn:hover {
      color: var(--text-primary);
      background: var(--bg);
    }
    .hero__indicators {
      position: absolute;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 6px;
      z-index: 3;
    }
    .hero__dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: rgba(255,255,255,0.35);
      transition: all 0.4s;
      cursor: pointer;
    }
    .hero__dot.is-active {
      background: #fff;
      width: 20px;
      border-radius: 3px;
    }
    .hero__scroll-hint {
      position: absolute;
      bottom: 24px;
      right: 24px;
      z-index: 3;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      color: rgba(255,255,255,0.5);
      font-size: 11px;
      letter-spacing: 0.05em;
      animation: float 2s ease-in-out infinite;
    }
    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(4px); }
    }

    /* ======================
       2. AUTOCOMPLETE
       ====================== */
    .autocomplete {
      position: fixed;
      background: var(--surface);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-xl);
      overflow: hidden;
      z-index: 60;
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
    }
    .autocomplete__list {
      max-height: 220px;       /* 约 5 条高度，超出可滚轮滑动 */
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--border-strong) transparent;
    }
    .autocomplete__list::-webkit-scrollbar {
      width: 5px;
    }
    .autocomplete__list::-webkit-scrollbar-thumb {
      background: var(--border-strong);
      border-radius: 10px;
    }
    .autocomplete__item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 12px 18px;
      font-size: 14px;
      color: var(--text-primary);
      background: transparent;
      border: none;
      cursor: pointer;
      text-align: left;
      transition: background 0.12s;
    }
    .autocomplete__item:hover { background: var(--bg); }
    .autocomplete__item-icon { color: var(--text-muted); flex-shrink: 0; }
    /* (Type filter moved to dropdown in category bar) */
    /* ======================
       4. CATEGORY BAR
       ====================== */
    .cat-bar {
      background: var(--surface);
      padding: 20px 0;
      margin-top: 0;
      border-bottom: 1px solid var(--border);
    }
    .cat-bar__inner {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 0 var(--gutter);
      display: flex;
      align-items: center;
      min-height: 46px;
      gap: 0;
    }
    .filter-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }


    /* ======================
       5. FILTER DROPDOWNS
       ====================== */
    .fdd { position: relative; }
    .fdd__trigger {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 8px 14px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-secondary);
      background: transparent;
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all var(--transition);
      white-space: nowrap;
    }
    .fdd__trigger:hover {
      color: var(--text-primary);
      background: var(--bg);
    }
    .fdd__trigger.is-active {
      color: var(--text-primary);
      border-color: var(--text-primary);
      background: var(--surface);
    }
    .fdd__trigger.is-open { background: var(--bg); }
    .fdd__chevron {
      width: 14px;
      height: 14px;
      transition: transform 0.2s;
      flex-shrink: 0;
    }
    .fdd__trigger.is-open .fdd__chevron { transform: rotate(180deg); }
    .fdd__panel {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      min-width: 180px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      padding: 6px;
      z-index: 50;
      display: none;
    }
    .fdd__panel.is-visible {
      display: block;
      animation: panelIn 0.15s ease-out;
    }
    .fdd__panel--scrollable {
      max-height: 360px;
      overflow-y: auto;
    }
    @keyframes panelIn {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .fdd__option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 12px;
      font-size: 14px;
      color: var(--text-secondary);
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.12s;
      border: none;
      background: transparent;
      width: 100%;
      text-align: left;
    }
    .fdd__option:hover { background: var(--bg); color: var(--text-primary); }
    .fdd__option.is-selected {
      color: var(--text-primary);
      font-weight: 600;
    }
    .fdd__option-check {
      width: 16px;
      height: 16px;
      color: var(--text-primary);
      opacity: 0;
    }
    .fdd__option.is-selected .fdd__option-check { opacity: 1; }

    /* ======================
       6. COLOR SWATCHES
       ====================== */
    .swatch-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 6px 2px;
    }
    .swatch {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer;
      transition: all 0.15s;
      position: relative;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
    }
    .swatch:hover { transform: scale(1.2); }
    .swatch.is-selected {
      border-color: var(--text-primary);
      box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text-primary);
    }

    /* ======================
       7. ACTIVE FILTERS
       ====================== */
    .filters-strip {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 10px var(--gutter) 0;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
    }
    .filters-strip:empty { display: none; }
    .filter-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px 4px 12px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--surface);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-full);
      cursor: pointer;
      transition: all 0.15s;
    }
    .filter-pill:hover {
      border-color: var(--text-secondary);
      color: var(--text-primary);
    }
    .filter-pill__x {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--border-strong);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
    }
    .filter-pill:hover .filter-pill__x { background: #ddd; }
    .filter-pill--color { gap: 5px; }
    .filter-pill__swatch {
      display: inline-block;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
      vertical-align: middle;
      flex-shrink: 0;
    }
    .filter-pill__label {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
    }
    .filter-pill__x svg { width: 8px; height: 8px; color: var(--text-secondary); pointer-events: none; }
    .filters-clear {
      font-size: 12px;
      color: var(--text-muted);
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px 8px;
      transition: color 0.15s;
    }
    .filters-clear:hover { color: var(--text-primary); }

    /* ======================
       8. GALLERY
       ====================== */
    .gallery {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 28px var(--gutter) 0;
    }
    .gallery__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .gallery__count {
      font-size: 14px;
      color: var(--text-muted);
      font-weight: 400;
    }
    .gallery__count strong {
      color: var(--text-primary);
      font-weight: 600;
    }

    /* ======================
       9. MASONRY GRID
       ====================== */
    .masonry {
      column-count: 3;
      column-gap: 16px;
    }
    @media (max-width: 1200px) { .masonry { column-count: 3; } }
    @media (max-width: 768px)  { .masonry { column-count: 2; column-gap: 12px; } }
    @media (max-width: 480px)  { .masonry { column-count: 2; column-gap: 8px; } }

    /* ======================
       10. IMAGE CARD
       ====================== */
    .card {
      break-inside: avoid;
      margin-bottom: 16px;
      border-radius: var(--radius-md);
      overflow: hidden;
      position: relative;
      cursor: pointer;
      background: var(--surface);
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .card.is-visible {
      opacity: 1;
      transform: none;
    }
    @media (max-width: 768px) { .card { margin-bottom: 12px; border-radius: var(--radius-sm); } }
    .card__img-wrap {
      position: relative;
      overflow: hidden;
    }
    .card__img {
      width: 100%;
      display: block;
      transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    }
    .card:hover .card__img { transform: scale(1.03); }
    .card__overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to top,
        rgba(0,0,0,0.55) 0%,
        rgba(0,0,0,0.1) 35%,
        transparent 60%
      );
      opacity: 0;
      transition: opacity 0.35s ease;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 16px;
    }
    .card:hover .card__overlay { opacity: 1; }
    .card__title {
      color: #fff;
      font-size: 14px;
      font-weight: 500;
      line-height: 1.4;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin-bottom: 8px;
    }
    .card__bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .card__meta {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .card__badge {
      font-size: 10px;
      color: rgba(255,255,255,0.85);
      background: rgba(255,255,255,0.15);
      backdrop-filter: blur(6px);
      padding: 3px 8px;
      border-radius: 4px;
      font-weight: 500;
    }
    .card__badge--type {
      background: rgba(79,70,229,0.7);
      font-weight: 600;
    }
    /* Card author info (visible on hover) */
    .card__author {
      display: flex;
      align-items: center;
      gap: 6px;
      position: absolute;
      top: 12px;
      left: 12px;
      opacity: 0;
      transform: translateY(-4px);
      transition: all 0.3s ease;
    }
    .card:hover .card__author {
      opacity: 1;
      transform: translateY(0);
    }
    .card__author-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: rgba(255,255,255,0.2);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #fff;
      font-weight: 600;
    }
    .card__author-name {
      font-size: 11px;
      color: rgba(255,255,255,0.9);
      font-weight: 500;
      text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }

    /* ======================
       11. LIGHTBOX
       ====================== */
    .lb {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: flex;
      flex-direction: column;
      background: rgba(0,0,0,0.94);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    .lb__topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 20px;
      flex-shrink: 0;
      z-index: 3;
    }
    .lb__actions { display: flex; align-items: center; gap: 8px; }
    .lb__btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 18px;
      background: rgba(255,255,255,0.1);
      color: #fff;
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 500;
      border: none;
      cursor: pointer;
      transition: all 0.2s;
    }
    .lb__btn:hover { background: rgba(255,255,255,0.2); }
    .lb__btn--primary {
      background: #fff;
      color: var(--text-primary);
    }
    .lb__btn--primary:hover { background: #f0f0f0; }
    .lb__icon-btn {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(255,255,255,0.1);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      cursor: pointer;
      transition: background 0.2s;
    }
    .lb__icon-btn:hover { background: rgba(255,255,255,0.2); }
    .lb__stage {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      min-height: 0;
    }
    .lb__img {
      max-width: 92vw;
      max-height: 82vh;
      object-fit: contain;
      border-radius: 4px;
      user-select: none;
      -webkit-user-drag: none;
    }
    .lb__nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      cursor: pointer;
      transition: all 0.2s;
    }
    .lb__nav:hover { background: rgba(255,255,255,0.18); }
    .lb__nav--prev { left: 20px; }
    .lb__nav--next { right: 20px; }
    .lb__bottom {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 48px 28px 22px;
      background: linear-gradient(transparent, rgba(0,0,0,0.6));
      z-index: 3;
    }
    .lb__title {
      font-size: 16px;
      font-weight: 600;
      color: #fff;
      margin-bottom: 6px;
    }
    .lb__meta {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 12px;
      color: rgba(255,255,255,0.6);
    }
    .lb__meta span { display: inline-flex; align-items: center; gap: 4px; }

    /* ======================
       12. PAGINATION
       ====================== */
    .pager {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 40px var(--gutter) 64px;
    }
    .pager__btn {
      padding: 8px 16px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--surface);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
    }
    .pager__btn:hover:not([disabled]) {
      border-color: var(--text-primary);
      color: var(--text-primary);
    }
    .pager__btn[disabled] { opacity: 0.3; cursor: not-allowed; }
    .pager__num {
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--surface);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: all 0.15s;
    }
    .pager__num:hover {
      border-color: var(--text-primary);
      color: var(--text-primary);
    }
    .pager__num.is-active {
      background: var(--text-primary);
      color: #fff;
      border-color: var(--text-primary);
    }
    .pager__ellipsis {
      color: var(--text-muted);
      padding: 0 4px;
      font-size: 14px;
    }

    /* ======================
       13. EMPTY STATE
       ====================== */
    .empty {
      text-align: center;
      padding: 80px 20px;
      color: var(--text-muted);
    }
    .empty__icon {
      width: 56px;
      height: 56px;
      margin: 0 auto 16px;
      color: var(--border-strong);
    }
    .empty__title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 6px;
    }
    .empty__desc {
      font-size: 14px;
    }

    /* ======================
       14. FOOTER
       ====================== */

    /* ======================
       14.5 SKELETON SCREEN
       ====================== */
    .skeleton-grid {
      column-count: 3;
      column-gap: 16px;
      margin-bottom: 16px;
    }
    @media (max-width: 1200px) { .skeleton-grid { column-count: 3; } }
    @media (max-width: 768px)  { .skeleton-grid { column-count: 2; column-gap: 12px; } }
    @media (max-width: 480px)  { .skeleton-grid { column-count: 2; column-gap: 8px; } }
    .skeleton-card {
      break-inside: avoid;
      margin-bottom: var(--gutter);
      border-radius: var(--radius-md);
      overflow: hidden;
      background: var(--surface);
      border: 1px solid var(--border);
    }
    .skeleton-img {
      width: 100%;
      aspect-ratio: 3/4;
      background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
    }
    .skeleton-img--wide { aspect-ratio: 4/3; }
    .skeleton-text {
      height: 12px;
      margin: 12px;
      border-radius: 6px;
      background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
    }
    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    /* ======================
       15. RESPONSIVE
       ====================== */
    @media (max-width: 768px) {
      .hero__desc { display: none; }
      .cat-bar { padding: 12px 0; }
      .filter-row { gap: 6px; }
      .fdd__trigger { padding: 5px 10px; font-size: 12px; }
      .hero {
        height: 55vh;
        min-height: 380px;
      }
      .hero__title { font-size: 1.75rem; }
      .hero__search-btn { padding: 0 16px; font-size: 14px; }
      .hero__scroll-hint { display: none; }
      .gallery { padding-top: 16px; }
      .card { margin-bottom: 10px; }
      .lb__nav { width: 38px; height: 38px; }
      .lb__nav--prev { left: 8px; }
      .lb__nav--next { right: 8px; }
      .lb__bottom { padding: 32px 16px 16px; }
    }
    @media (max-width: 480px) {
      .hero { height: 48vh; min-height: 320px; }
      .hero__title { font-size: 1.4rem; }
      .hero__desc { font-size: 0.85rem; margin-bottom: 20px; }
      .hero__search { padding: 4px 4px 4px 14px; }
      .hero__search input { font-size: 14px; }
      .hero__search-btn { height: 36px; padding: 0 12px; font-size: 0; min-width: 36px; }
      .hero__search-btn::after { content: ''; display: block; width: 16px; height: 16px; background: currentColor; -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="white" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>') no-repeat center / contain; mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="white" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>') no-repeat center / contain; }
      .filter-row { gap: 6px; }
    }
