:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --gutter: clamp(20px, 3.6vw, 56px);
    --ease-sero: cubic-bezier(.75, 0, .25, 1);
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { background: #07070A; color-scheme: dark; scroll-behavior: smooth; }
  body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
  img { display: block; max-width: 100%; }

  /* Catalog Content Band (Rises Smoothly Over Dissolving Hero With ZERO Gap!) */
  .cat-stage {
    position: relative;
    z-index: 6;
    width: 100%;
    max-width: 1860px;
    margin: 0 auto;
    padding: clamp(20px, 3.2vh, 44px) var(--gutter) 108px;
    scroll-margin-top: 72px;
  }
  .cat-hero {
    text-align: center;
    max-width: 780px;
    margin: 0 auto clamp(42px, 5vw, 68px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .cat-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
    transition: color 0.5s ease, text-shadow 0.5s ease;
  }
  .cat-kicker-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
  .cat-title {
    font-size: clamp(44px, 5.8vw, 84px);
    font-weight: 400;
    letter-spacing: -0.042em;
    line-height: 0.94;
    color: #FFFFFF;
    text-shadow: 0 4px 32px rgba(0, 0, 0, 0.62);
    transition: color 0.5s ease, text-shadow 0.5s ease;
  }
  .cat-lead {
    font-size: 14.5px;
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.76);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.58);
    max-width: 520px;
    transition: color 0.5s ease, text-shadow 0.5s ease;
  }

  /* Unified Floating Liquid-Pill Command Dock */
  .mg-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 8px 10px;
    margin-bottom: clamp(48px, 5.6vw, 80px);
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.64);
    backdrop-filter: blur(26px) saturate(1.18);
    -webkit-backdrop-filter: blur(26px) saturate(1.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
  .mg-filters { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
  .mg-f-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 11px 18px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.68);
    transition: color 0.25s ease, background 0.28s var(--ease-sero);
    white-space: nowrap;
  }
  .mg-f-btn:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
  .mg-f-btn.active {
    background: #FFFFFF;
    color: #08080A;
    font-weight: 600;
    box-shadow: 0 6px 22px rgba(255, 255, 255, 0.18);
  }
  .mg-controls-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .mg-search-pill {
    background: rgba(8, 8, 12, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    padding: 10px 16px;
    width: 170px;
    outline: none;
    transition: border-color 0.22s ease, width 0.3s var(--ease-sero);
  }
  .mg-search-pill::placeholder { color: rgba(255, 255, 255, 0.44); }
  .mg-search-pill:focus { border-color: rgba(255, 255, 255, 0.45); width: 215px; }

  .mg-switch {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 4px;
    border-radius: 999px;
    background: rgba(8, 8, 11, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-width: 196px;
  }
  .mg-switch-thumb {
    position: absolute;
    top: 4px; bottom: 4px; left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: #FFFFFF;
    transition: transform 0.42s var(--ease-sero);
    pointer-events: none;
  }
  .mg-switch.is-product .mg-switch-thumb { transform: translateX(100%); }
  .mg-gv-btn {
    position: relative; z-index: 2;
    font-family: var(--font-mono);
    font-size: 9.5px; letter-spacing: 0.15em;
    padding: 8px 12px; border-radius: 999px;
    color: rgba(255, 255, 255, 0.66); text-align: center;
    transition: color 0.3s ease;
  }
  .mg-gv-btn.active { color: #08080A; font-weight: 600; }

  .mg-sort-wrap { position: relative; display: inline-flex; align-items: center; }
  .mg-sort-wrap::after { content: "▾"; position: absolute; right: 14px; font-size: 10px; color: rgba(255,255,255,0.62); pointer-events: none; }
  .mg-sort {
    appearance: none; -webkit-appearance: none;
    background: rgba(8, 8, 11, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.90);
    font-family: var(--font-mono);
    font-size: 9.5px; letter-spacing: 0.14em;
    padding: 11px 32px 11px 16px;
    cursor: pointer; outline: none;
  }
  .mg-sort option { background: #101014; color: #FFFFFF; }

  /* 100% Invisible Curated Chapters & Grids Directly Over Plasma */
  .mg-chapters { display: flex; flex-direction: column; gap: clamp(64px, 7vw, 112px); }
  .mg-chap-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
    margin-bottom: clamp(28px, 3.2vw, 44px);
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    transition: border-color 0.5s ease;
  }
  .mg-chap-l { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
  .mg-chap-num, .mg-chap-pill {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.86);
    padding: 5px 12px; border-radius: 999px;
    background: rgba(8, 8, 12, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: all 0.5s ease;
  }
  .mg-chap-title {
    font-size: clamp(26px, 2.8vw, 40px); font-weight: 400; letter-spacing: -0.028em;
    color: #FFFFFF; text-shadow: 0 3px 22px rgba(0, 0, 0, 0.55);
    transition: color 0.5s ease, text-shadow 0.5s ease;
  }
  .mg-chap-r {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
    transition: color 0.5s ease, text-shadow 0.5s ease;
  }

  .mg-hero-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(26px, 3vw, 44px); margin-bottom: clamp(32px, 3.6vw, 52px); }
  .mg-hero-pair .gm-stage { aspect-ratio: 4 / 4.8; }
  .mg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(26px, 2.8vw, 42px); }
  .mg-grid.is-evening { grid-template-columns: repeat(4, 1fr); }

  .gm-card { display: flex; flex-direction: column; transition: transform 0.5s var(--ease-sero); }
  .gm-card:hover { transform: translateY(-5px); }
  .gm-stage { position: relative; aspect-ratio: 3 / 4; overflow: visible; background: transparent; cursor: pointer; }
  .gm-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: contain; object-position: 50% 42%;
    padding: 20px 6px 54px;
    filter: drop-shadow(0 26px 38px rgba(0, 0, 0, 0.44));
    transition: transform 0.8s var(--ease-sero), opacity 0.24s ease;
  }
  .gm-card:hover .gm-img { transform: scale(1.04) translateY(-4px); }
  .gm-img.is-swapping { opacity: 0.18; }

  .gm-top-badges {
    position: absolute; top: 14px; left: 14px; right: 14px; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; pointer-events: none;
  }
  .gm-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(8, 8, 11, 0.62); border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88); backdrop-filter: blur(12px);
  }
  .gm-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: #FF5A26; box-shadow: 0 0 10px rgba(255,90,38,0.85); }
  .gm-code {
    font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(8, 8, 11, 0.50); color: rgba(255, 255, 255, 0.60); backdrop-filter: blur(10px);
  }

  .gm-views {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6;
    display: flex; align-items: center; justify-content: center; gap: 3px;
    padding: 4px; border-radius: 999px;
    background: rgba(8, 8, 11, 0.72); border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.28s ease, transform 0.34s var(--ease-sero);
  }
  .gm-card:hover .gm-views, .gm-card.is-locked .gm-views, .gm-card:focus-within .gm-views { opacity: 1; transform: translateY(0); }
  @media (hover: none), (pointer: coarse) { .gm-views { opacity: 1; transform: translateY(0); } }
  .gm-v-btn {
    flex: 1; font-family: var(--font-mono); font-size: 8.8px; letter-spacing: 0.14em;
    padding: 8px 6px; border-radius: 999px; color: rgba(255, 255, 255, 0.66); text-align: center;
    transition: background 0.25s var(--ease-sero), color 0.22s ease; white-space: nowrap;
  }
  .gm-v-btn:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
  .gm-v-btn.active { background: #FFFFFF; color: #08080A; font-weight: 600; }

  .gm-meta { padding: 16px 4px 8px; display: flex; flex-direction: column; gap: 6px; }
  .gm-row-1 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .gm-name { font-size: 15.5px; font-weight: 500; letter-spacing: -0.015em; color: #FFFFFF; text-shadow: 0 2px 14px rgba(0,0,0,0.55); transition: opacity 0.2s ease, color 0.5s ease; }
  .gm-name:hover { opacity: 0.72; }
  .gm-price { font-family: var(--font-mono); font-size: 13.5px; color: rgba(255,255,255,0.94); text-shadow: 0 2px 14px rgba(0,0,0,0.55); white-space: nowrap; transition: color 0.5s ease; }
  .gm-row-2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; min-height: 38px; }
  .gm-sub { font-size: 12px; color: rgba(255,255,255,0.72); text-shadow: 0 1px 12px rgba(0,0,0,0.55); line-height: 1.4; transition: color 0.5s ease; }
  .gm-quick-wrap { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; flex-shrink: 0; }
  .gm-open-btn, .gm-plus-btn {
    width: 36px; height: 36px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #FFFFFF; background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.25s var(--ease-sero);
  }
  .gm-open-btn { font-size: 13px; }
  .gm-plus-btn { font-size: 18px; font-weight: 300; line-height: 1; }
  .gm-open-btn:hover, .gm-plus-btn:hover { background: #FFFFFF; color: #08080A; border-color: #FFFFFF; }
  .gm-plus-btn:hover { transform: rotate(90deg) scale(1.05); }
  .gm-card.is-buying .gm-open-btn, .gm-card.is-buying .gm-plus-btn, .gm-card.is-buying .gm-sub { display: none; }
  .gm-size-tray {
    display: none; align-items: center; justify-content: space-between; width: 100%; gap: 8px;
    padding: 4px 6px 4px 12px; border-radius: 999px;
    background: rgba(10, 10, 15, 0.62); border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
  }
  .gm-card.is-buying .gm-quick-wrap { width: 100%; }
  .gm-card.is-buying .gm-size-tray { display: flex; }
  .gm-tray-lbl { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em; color: rgba(255,255,255,0.60); }
  .gm-sizes { display: flex; align-items: center; gap: 4px; }
  .gm-sz {
    min-width: 30px; height: 28px; border-radius: 999px;
    font-family: var(--font-mono); font-size: 9.5px;
    color: rgba(255,255,255,0.92); background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16); transition: all 0.18s ease;
  }
  .gm-sz:hover { background: #FFFFFF; color: #08080A; border-color: #FFFFFF; }
  .gm-tray-close { width: 26px; height: 26px; border-radius: 999px; font-size: 11px; color: rgba(255,255,255,0.68); }

  /* Automatic Chameleon Light-World Ink Adaptation */
  body.on-light .cat-kicker, body.on-light .cat-title, body.on-light .mg-chap-title, body.on-light .gm-name, body.on-light .gm-price {
    color: #0A0A0D; text-shadow: 0 1px 14px rgba(255, 255, 255, 0.65);
  }
  body.on-light .cat-lead, body.on-light .mg-chap-r, body.on-light .gm-sub {
    color: rgba(10, 10, 14, 0.72); text-shadow: 0 1px 12px rgba(255, 255, 255, 0.60);
  }
  body.on-light .mg-chap-head { border-bottom-color: rgba(10, 10, 14, 0.16); }
  body.on-light .mg-chap-num, body.on-light .mg-chap-pill { color: #0A0A0D; background: rgba(255,255,255,0.58); border-color: rgba(10,10,14,0.16); }
  body.on-light .gm-open-btn, body.on-light .gm-plus-btn { color: #0A0A0D; background: rgba(255,255,255,0.58); border-color: rgba(10,10,14,0.22); }
  body.on-light .gm-open-btn:hover, body.on-light .gm-plus-btn:hover { background: #0A0A0D; color: #FFFFFF; border-color: #0A0A0D; }

  .cat-empty {
    text-align: center; padding: 80px 20px;
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.68);
  }

  @media (max-width: 1120px) { .mg-grid.is-evening { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 860px) {
    .mg-hero-pair, .mg-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .mg-dock { border-radius: 26px; padding: 14px; }
    .mg-search-pill, .mg-search-pill:focus { width: 100%; }
  }
  @media (max-width: 560px) {
    .mg-hero-pair, .mg-grid, .mg-grid.is-evening { grid-template-columns: 1fr; }
  }
