    :root {
      --white-50: #fafafa;
      --white-100: #f5f5f5;
      --white-200: #e8e8e8;
      --white-300: #d4d4d4;
      --white-400: #a3a3a3;
      --white-500: #737373;
      --white-600: #525252;
      --white-700: #404040;
      --white-800: #262626;
      --white-900: #171717;
      --accent: #2563eb;
      --accent-hover: #1d4ed8;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
      background: var(--white-50);
      color: var(--white-800);
      min-height: 100vh;
      line-height: 1.5;
    }

    /* Header — sticky with blur-on-scroll */
    .header {
      position: sticky;
      top: 0;
      z-index: 100;
      height: 56px;
      padding: 0 24px;
      display: flex;
      align-items: center;
      gap: 12px;
      background: transparent;
      transition: background .25s, border-color .25s;
    }

    .header.scrolled {
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: saturate(180%) blur(20px);
      -webkit-backdrop-filter: saturate(180%) blur(20px);
      border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    /* Search — grows to fill available space */
    .search-wrap {
      position: relative;
      display: flex;
      align-items: center;
      flex: 1;
    }

    .search-input {
      width: 100%;
      padding: 8px 36px 8px 38px;
      border: 1px solid var(--white-200);
      border-radius: 100px;
      font-size: 14px;
      background: var(--white-100);
      transition: border-color .2s, box-shadow .2s, background .2s;
      font-family: inherit;
    }

    .search-input:focus {
      outline: none;
      border-color: var(--accent);
      background: white;
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    }

    /* Header nav */
    .header-nav {
      display: flex;
      align-items: center;
      gap: 2px;
      flex-shrink: 0;
    }

    .header-nav-btn {
      height: 34px;
      padding: 0 12px;
      border: none;
      background: transparent;
      font-size: 13px;
      font-weight: 500;
      color: var(--white-600);
      border-radius: 7px;
      cursor: pointer;
      transition: background .15s, color .15s;
      white-space: nowrap;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .header-nav-btn:hover {
      background: var(--white-100);
      color: var(--white-900);
    }

    .header-nav-gh {
      width: 34px;
      padding: 0;
      text-decoration: none;
    }

    .search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--white-400);
      pointer-events: none;
      font-size: 15px;
    }

    .search-shortcut {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 11px;
      color: var(--white-400);
      background: var(--white-100);
      border: 1px solid var(--white-300);
      border-radius: 4px;
      padding: 1px 5px;
      pointer-events: none;
      transition: opacity 0.15s;
      font-family: inherit;
    }

    .search-input:focus ~ .search-shortcut,
    .search-clear:not([hidden]) ~ .search-shortcut {
      opacity: 0;
    }

    .search-clear {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      width: 20px;
      height: 20px;
      border: none;
      background: var(--white-300);
      color: var(--white-600);
      border-radius: 50%;
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      transition: background 0.15s;
      font-family: inherit;
    }

    .search-clear:hover {
      background: var(--white-400);
      color: white;
    }

    /* Main */
    .main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 48px 32px 48px;
    }

    /* Hero */
    .hero {
      text-align: center;
      margin-bottom: 48px;
    }

    .hero h1 {
      font-size: 42px;
      font-weight: 700;
      letter-spacing: -1px;
      margin-bottom: 12px;
      color: var(--white-900);
    }

    .hero p {
      font-size: 17px;
      color: var(--white-500);
      max-width: 540px;
      margin: 0 auto;
    }

    /* Quick Links */
    .quick-links {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-bottom: 48px;
      flex-wrap: wrap;
    }

    .quick-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 20px;
      background: white;
      border: 1px solid var(--white-300);
      border-radius: 6px;
      color: var(--white-700);
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s;
    }

    .quick-link:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    /* Section */
    .section {
      margin-bottom: 48px;
    }

    .section-title {
      font-size: 20px;
      font-weight: 600;
      color: var(--white-900);
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .tool-count {
      font-size: 12px;
      font-weight: 600;
      color: var(--white-500);
      background: var(--white-100);
      border: 1px solid var(--white-200);
      border-radius: 20px;
      padding: 2px 9px;
      letter-spacing: 0.2px;
    }

    /* Category Tabs */
    .tabs {
      display: flex;
      gap: 4px;
      padding: 4px;
      background: var(--white-100);
      border-radius: 8px;
      margin-bottom: 20px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar { display: none; }

    .tab {
      padding: 8px 16px;
      border: none;
      background: transparent;
      font-size: 13px;
      font-weight: 500;
      color: var(--white-600);
      cursor: pointer;
      border-radius: 6px;
      white-space: nowrap;
      transition: all 0.15s;
      font-family: inherit;
    }

    .tab:hover { color: var(--white-800); }

    .tab.active {
      background: white;
      color: var(--white-900);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    /* Tools Grid */
    .tools-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 12px;
    }

    .tool-card {
      display: block;
      padding: 20px;
      background: white;
      border: 1px solid var(--white-200);
      border-radius: 8px;
      text-decoration: none;
      color: inherit;
      transition: all 0.18s;
      position: relative;
    }

    .tool-card:hover {
      border-color: var(--white-300);
      box-shadow: 0 4px 12px rgba(0,0,0,0.07);
      transform: translateY(-1px);
    }

    .tool-card::after {
      content: "↗";
      position: absolute;
      top: 16px;
      right: 16px;
      font-size: 12px;
      color: var(--white-300);
      transition: color 0.18s, transform 0.18s;
    }

    .tool-card:hover::after {
      color: var(--accent);
      transform: translate(1px, -1px);
    }

    .tool-icon {
      font-size: 24px;
      margin-bottom: 12px;
    }

    .tool-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--white-900);
      margin-bottom: 4px;
    }

    .tool-desc {
      font-size: 13px;
      color: var(--white-500);
      line-height: 1.4;
    }

    /* Empty search state */
    .tools-empty {
      grid-column: 1 / -1;
      text-align: center;
      padding: 56px 24px;
      color: var(--white-500);
    }

    .tools-empty-icon {
      font-size: 36px;
      margin-bottom: 12px;
    }

    .tools-empty p { font-size: 15px; margin-bottom: 16px; }

    .tools-empty-clear {
      padding: 8px 20px;
      background: white;
      border: 1px solid var(--white-300);
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
      color: var(--white-700);
      cursor: pointer;
      transition: all 0.15s;
      font-family: inherit;
    }

    .tools-empty-clear:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    /* WIP Section */
    .wip-section {
      margin-top: 48px;
      padding-top: 40px;
      border-top: 1px dashed var(--white-300);
    }

    .wip-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
    }

    .wip-title {
      font-size: 18px;
      font-weight: 600;
      color: var(--white-700);
    }

    .wip-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 10px;
      background: #fef3c7;
      border: 1px solid #fcd34d;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      color: #92400e;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .wip-desc {
      font-size: 13px;
      color: var(--white-500);
      margin-bottom: 20px;
    }

    .wip-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 12px;
    }

    .wip-card {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 18px 20px;
      background: var(--white-50);
      border: 1.5px dashed var(--white-300);
      border-radius: 10px;
      position: relative;
      overflow: hidden;
      transition: border-color 0.2s, background 0.2s;
    }

    .wip-card:hover {
      border-color: #fcd34d;
      background: #fffbeb;
    }

    .wip-card-badge {
      position: absolute;
      top: 10px;
      right: 10px;
      padding: 2px 7px;
      background: #fef3c7;
      border: 1px solid #fcd34d;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 700;
      color: #92400e;
      letter-spacing: 0.4px;
    }

    .wip-card-icon {
      font-size: 22px;
      line-height: 1;
    }

    .wip-card-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--white-700);
      padding-right: 36px;
    }

    .wip-card-type {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 4px;
      display: inline-block;
      letter-spacing: 0.3px;
      align-self: flex-start;
    }

    .wip-card-type--web        { background: #eff6ff; color: #2563eb; }
    .wip-card-type--powershell { background: #f0fdf4; color: #16a34a; }
    .wip-card-type--shell      { background: #faf5ff; color: #7c3aed; }
    .wip-card-type--rust       { background: #fff7ed; color: #c2410c; }

    .wip-card-bar {
      height: 3px;
      background: var(--white-200);
      border-radius: 2px;
      overflow: hidden;
      margin-top: 2px;
    }

    .wip-card-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #fcd34d, #f59e0b);
      border-radius: 2px;
      width: 8%;
    }

    @media (max-width: 640px) {
      .wip-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
      .wip-card { padding: 14px 14px; }
    }

    /* Footer */
    .footer {
      text-align: center;
      padding: 48px 32px;
      border-top: 1px solid var(--white-200);
      margin-top: 64px;
    }

    .footer p {
      font-size: 14px;
      color: var(--white-500);
    }

    .footer a {
      color: var(--accent);
      text-decoration: none;
    }

    .footer a:hover {
      text-decoration: underline;
    }

    /* Responsive */
    @media (max-width: 768px) {
      .header {
        height: 52px;
        padding: 0 16px;
        gap: 10px;
      }

      /* Nav becomes a sticky bottom tab bar on mobile */
      .header-nav {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 56px;
        z-index: 200;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: saturate(180%) blur(16px);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        display: flex;
        align-items: stretch;
        gap: 0;
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom);
      }

      .header-nav-btn {
        flex: 1;
        height: auto;
        border-radius: 0;
        font-size: 12px;
        flex-direction: column;
        gap: 2px;
        color: var(--white-500);
      }

      .header-nav-btn:hover,
      .header-nav-btn:active {
        background: var(--white-100);
        color: var(--white-900);
      }

      .header-nav-gh {
        width: auto;
        flex: 1;
      }

      .search-input { font-size: 16px; /* prevent iOS zoom */ }

      /* Push main content above the bottom nav */
      .main { padding-bottom: 80px; }

      .main { padding: 24px 16px 48px; }

      .hero h1 { font-size: 28px; }
      .hero p  { font-size: 15px; }

      .tools-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

      .tool-card { padding: 14px; }
      .tool-card::after { display: none; }
    }

    @media (max-width: 480px) {
      .tools-grid { grid-template-columns: 1fr; }
    }

    /* ============================================================
       GALLERY OVERLAY
    ============================================================ */

    button.quick-link {
      background: white;
      cursor: pointer;
      font-family: inherit;
    }

    .gallery-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: var(--white-50);
      display: flex;
      flex-direction: column;
      opacity: 0;
      pointer-events: none;
      transform: translateY(12px);
      transition: opacity 0.25s ease, transform 0.25s ease;
      overflow: hidden;
    }

    .gallery-overlay.gallery-open {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    /* Sticky header */
    .gallery-header {
      flex-shrink: 0;
      background: white;
      border-bottom: 1px solid var(--white-200);
    }

    .gallery-header-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 16px 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .gallery-header-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .gallery-header-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--white-900);
    }

    .gallery-close-btn {
      width: 36px;
      height: 36px;
      border: 1px solid var(--white-300);
      border-radius: 6px;
      background: white;
      color: var(--white-600);
      cursor: pointer;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
      font-family: inherit;
    }

    .gallery-close-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    /* Scrollable content area */
    .gallery-content {
      flex: 1;
      overflow-y: auto;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
    }

    /* Hero */
    .gallery-hero {
      position: relative;
      height: 360px;
      overflow: hidden;
      background: var(--white-200);
    }

    .gallery-hero-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      display: block;
    }

    .gallery-hero-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 40px 48px;
    }

    .gallery-hero-title {
      font-size: 36px;
      font-weight: 700;
      color: white;
      letter-spacing: -0.75px;
      margin-bottom: 8px;
      text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }

    .gallery-hero-sub {
      font-size: 15px;
      color: rgba(255,255,255,0.82);
    }

    /* Sections */
    .gallery-section {
      max-width: 1200px;
      margin: 0 auto;
      padding: 48px 32px;
    }

    .gallery-section + .gallery-section {
      border-top: 1px solid var(--white-200);
    }

    .gallery-section-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      margin-bottom: 28px;
      flex-wrap: wrap;
      gap: 8px;
    }

    .gallery-section-title {
      font-size: 22px;
      font-weight: 700;
      color: var(--white-900);
      letter-spacing: -0.4px;
    }

    .gallery-section-sub {
      font-size: 13px;
      color: var(--white-500);
    }

    /* Filter bar */
    .gallery-filters {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 28px;
    }

    .filter-group {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .filter-label {
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--white-500);
      min-width: 72px;
      flex-shrink: 0;
    }

    .filter-chips {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .filter-chip {
      padding: 5px 14px;
      border: 1px solid var(--white-300);
      border-radius: 20px;
      background: white;
      font-size: 13px;
      font-weight: 500;
      color: var(--white-600);
      cursor: pointer;
      transition: all 0.15s;
      font-family: inherit;
      white-space: nowrap;
    }

    .filter-chip:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .filter-chip.active {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }

    /* ── Card grids — mobile-first ─────────────────────────────── */
    .gallery-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .gallery-grid--concepts {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    @media (min-width: 480px) {
      .gallery-grid--concepts { grid-template-columns: 1fr 1fr; }
    }

    @media (min-width: 768px) {
      .gallery-grid          { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
      .gallery-grid--concepts{ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
    }

    /* ── Card shell ─────────────────────────────────────────────── */
    .gallery-card {
      background: white;
      border: 1px solid var(--white-200);
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    /* Family-color left accent stripe — injected via --fc CSS var */
    .gallery-card::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 3px;
      height: 100%;
      background: var(--fc, var(--accent));
      z-index: 1;
      border-radius: 12px 0 0 12px;
    }

    .gallery-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 28px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
      border-color: var(--fc, var(--accent));
    }

    .gallery-card:focus-visible {
      outline: 2px solid var(--fc, var(--accent));
      outline-offset: 3px;
    }

    /* ── Image wrap ─────────────────────────────────────────────── */
    .gallery-card-img-wrap {
      width: 100%;
      aspect-ratio: 4 / 3;
      background: var(--white-100);
      overflow: hidden;
      flex-shrink: 0;
      position: relative;
    }

    .gallery-card-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
      transition: transform 0.35s ease;
      display: block;
    }

    .gallery-card:hover .gallery-card-img {
      transform: scale(1.06);
    }

    /* Hover overlay: "Expand" hint */
    .gallery-card-img-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to top,
        rgba(0,0,0,0.55) 0%,
        rgba(0,0,0,0) 55%
      );
      opacity: 0;
      transition: opacity 0.22s ease;
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      padding: 10px 12px;
    }

    .gallery-card:hover .gallery-card-img-overlay {
      opacity: 1;
    }

    .gallery-card-expand {
      font-size: 11px;
      font-weight: 600;
      color: white;
      letter-spacing: 0.4px;
      background: rgba(255,255,255,0.18);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border: 1px solid rgba(255,255,255,0.3);
      border-radius: 6px;
      padding: 4px 9px;
      line-height: 1;
    }

    /* Params badge floats on image (top-right) */
    .gallery-card-params-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      background: rgba(0,0,0,0.62);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      color: white;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.3px;
      padding: 3px 7px;
      border-radius: 20px;
      line-height: 1.4;
      z-index: 2;
    }

    /* ── Card body ──────────────────────────────────────────────── */
    .gallery-card-body {
      padding: 10px 12px 12px 14px;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .gallery-card-meta {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .gallery-card-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--fc, var(--accent));
      flex-shrink: 0;
    }

    .gallery-card-family {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--fc, var(--accent));
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .gallery-card-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--white-900);
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    @media (min-width: 768px) {
      .gallery-card-body  { padding: 12px 14px 14px 16px; gap: 5px; }
      .gallery-card-name  { font-size: 14px; }
      .gallery-card-family{ font-size: 11px; }
    }

    .gallery-card-size-badge {
      display: inline-flex;
      align-items: center;
      margin-top: 2px;
      align-self: flex-start;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.3px;
      background: color-mix(in srgb, var(--fc, var(--accent)) 12%, transparent);
      color: var(--fc, var(--accent));
    }

    /* Empty state */
    .gallery-empty {
      grid-column: 1 / -1;
      text-align: center;
      padding: 64px 24px;
      color: var(--white-500);
      font-size: 15px;
    }

    /* Lightbox */
    .lightbox {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .lightbox.lightbox-open {
      opacity: 1;
      pointer-events: auto;
    }

    .lightbox-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.9);
      cursor: pointer;
    }

    .lightbox-inner {
      position: relative;
      z-index: 1;
      max-width: min(90vw, 1100px);
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }

    .lightbox-img {
      max-width: 100%;
      max-height: 75vh;
      object-fit: contain;
      border-radius: 6px;
      box-shadow: 0 24px 64px rgba(0,0,0,0.6);
      display: block;
      transition: opacity 0.15s ease;
    }

    .lightbox-img.fade-out { opacity: 0; }

    .lightbox-caption { text-align: center; }

    .lightbox-caption-title {
      font-size: 16px;
      font-weight: 600;
      color: white;
      margin-bottom: 4px;
    }

    .lightbox-caption-meta {
      font-size: 13px;
      color: rgba(255,255,255,0.6);
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
      position: fixed;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 6px;
      color: white;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
      z-index: 2;
      line-height: 1;
    }

    .lightbox-close:hover,
    .lightbox-prev:hover,
    .lightbox-next:hover {
      background: rgba(255,255,255,0.24);
    }

    .lightbox-close {
      top: 20px;
      right: 20px;
      width: 40px;
      height: 40px;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .lightbox-prev,
    .lightbox-next {
      top: 50%;
      transform: translateY(-50%);
      width: 48px;
      height: 64px;
      font-size: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .lightbox-prev { left: 16px; }
    .lightbox-next { right: 16px; }

    /* Gallery responsive */
    @media (max-width: 768px) {
      .gallery-hero { height: 200px; }
      .gallery-hero-title { font-size: 20px; }
      .gallery-hero-overlay { padding: 20px 16px; }
      .gallery-hero-sub { font-size: 13px; }
      .gallery-header-inner { padding: 12px 16px; }
      .gallery-section { padding: 28px 16px; }
      .filter-group { flex-direction: column; align-items: flex-start; }
      .lightbox-prev { left: 8px; }
      .lightbox-next { right: 8px; }
    }

    /* ============================================================
       CRYPTO OVERLAY
    ============================================================ */

    .crypto-hero {
      height: 140px;
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
      display: flex;
      align-items: flex-end;
    }

    .crypto-hero-inner {
      padding: 28px 48px;
    }

    .crypto-controls {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .crypto-refresh-btn {
      padding: 5px 14px;
      border: 1px solid var(--white-300);
      border-radius: 20px;
      background: white;
      font-size: 13px;
      font-weight: 500;
      color: var(--white-600);
      cursor: pointer;
      transition: all 0.15s;
      font-family: inherit;
    }

    .crypto-refresh-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .crypto-refresh-btn.spinning {
      opacity: 0.6;
      pointer-events: none;
    }

    .crypto-loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      padding: 80px 24px;
      color: var(--white-500);
      font-size: 14px;
    }

    .crypto-spinner {
      width: 32px;
      height: 32px;
      border: 3px solid var(--white-200);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .crypto-error {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 20px 24px;
      background: #fef2f2;
      border: 1px solid #fecaca;
      border-radius: 8px;
      color: #b91c1c;
      font-size: 14px;
      margin-bottom: 24px;
    }

    .crypto-table-wrap {
      overflow-x: auto;
      border: 1px solid var(--white-200);
      border-radius: 8px;
    }

    .crypto-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
    }

    .crypto-th {
      padding: 12px 16px;
      text-align: left;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--white-500);
      background: var(--white-100);
      border-bottom: 1px solid var(--white-200);
      white-space: nowrap;
    }

    .crypto-th--num { text-align: right; }
    .crypto-th--rank { text-align: center; width: 48px; }

    .crypto-row {
      border-bottom: 1px solid var(--white-100);
      transition: background 0.1s;
    }

    .crypto-row:last-child { border-bottom: none; }
    .crypto-row:hover { background: var(--white-50); }

    .crypto-td {
      padding: 14px 16px;
      color: var(--white-800);
      white-space: nowrap;
    }

    .crypto-td--rank {
      text-align: center;
      color: var(--white-500);
      font-size: 12px;
    }

    .crypto-td--num { text-align: right; font-variant-numeric: tabular-nums; }

    .crypto-coin {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .crypto-coin-img {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .crypto-coin-name {
      font-weight: 600;
      color: var(--white-900);
    }

    .crypto-coin-symbol {
      font-size: 12px;
      color: var(--white-500);
      text-transform: uppercase;
    }

    .crypto-change {
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 2px;
    }

    .crypto-change--pos { color: #16a34a; }
    .crypto-change--neg { color: #dc2626; }

    .crypto-cap { color: var(--white-700); }

    @media (max-width: 768px) {
      .crypto-hero-inner { padding: 20px 16px; }
      .crypto-th--vol, .crypto-td--vol { display: none; }
    }

    /* Blockchain gallery — whitepaper link */
    .chain-wp-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-top: 6px;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: .03em;
      color: var(--accent);
      background: color-mix(in srgb, var(--accent) 10%, transparent);
      border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
      text-decoration: none;
      transition: background .15s, border-color .15s;
    }
    .chain-wp-btn:hover {
      background: color-mix(in srgb, var(--accent) 18%, transparent);
      border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    }
