
    :root {
      --bg: #070210;
      --bg-2: #0e051e;
      --deep: #16092c;
      --panel: rgba(22, 11, 40, 0.86);
      --panel-card: rgba(26, 14, 48, 0.78);
      --panel-hover: rgba(38, 18, 68, 0.94);
      --glass: rgba(192, 132, 252, 0.08);
      --line: rgba(192, 132, 252, 0.22);
      --line-2: rgba(255, 255, 255, 0.08);
      --text: #f5efff;
      --muted: #b3a2ce;
      --muted-2: #82709e;
      --ice: #c084fc;
      --ice-bright: #f0abfc;
      --ice-deep: #8b5cf6;
      --cyan: #38bdf8;
      --good: #34d399;
      --gold: #fbbf24;
      --danger: #f43f5e;
      --shadow: 0 28px 80px rgba(0,0,0,0.6);
      --radius: 18px;
      --radius-lg: 24px;
      --header-h: 74px;
      --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
    body {
      font-family: 'Inter', system-ui, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      overflow-x: hidden;
      min-height: 100vh;
      font-size: 15px;
      background:
        radial-gradient(1100px 700px at 50% -10%, rgba(147, 51, 234, 0.3), transparent 65%),
        radial-gradient(900px 600px at 15% 35%, rgba(192, 132, 252, 0.15), transparent 55%),
        radial-gradient(850px 550px at 85% 65%, rgba(56, 189, 248, 0.12), transparent 60%),
        linear-gradient(180deg, #070210 0%, #0d051c 50%, #05010b 100%);
      background-attachment: fixed;
    }

    #snow-canvas {
      position: fixed; inset: 0;
      width: 100%; height: 100%;
      pointer-events: none; z-index: 0;
    }

    a { color: inherit; text-decoration: none; }
    button, input { font: inherit; color: inherit; }
    :focus-visible { outline: 2px solid var(--ice-bright); outline-offset: 3px; border-radius: 6px; }
    ::selection { background: rgba(192, 132, 252, 0.4); color: #fff; }

    ::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-track { background: #070210; }
    ::-webkit-scrollbar-thumb { background: rgba(192, 132, 252, 0.35); border-radius: 999px; }

    .wrap {
      width: min(1280px, calc(100% - 32px));
      margin: 0 auto; position: relative; z-index: 2;
    }

    /* Header */
    header {
      position: fixed; top: 0; left: 0; right: 0;
      height: var(--header-h); z-index: 1000;
      background: rgba(7, 2, 16, 0.85);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--line-2);
      transition: background 0.3s, border-color 0.3s;
    }
    header.scrolled {
      background: rgba(7, 2, 16, 0.98);
      border-bottom-color: var(--line);
    }
    .nav {
      height: var(--header-h);
      display: flex; align-items: center; justify-content: space-between; gap: 16px;
    }
    .brand {
      display: flex; align-items: center; gap: 12px;
    }
    .brand-mark {
      width: 42px; height: 42px; border-radius: 12px;
      display: grid; place-items: center;
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(56, 189, 248, 0.2));
      border: 1px solid var(--line);
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
      font-size: 20px;
    }
    .brand-title {
      font-family: 'Oswald', sans-serif;
      font-weight: 700;
      letter-spacing: 0.12em;
      font-size: 1.25rem;
      background: linear-gradient(120deg, #fff 30%, var(--ice-bright) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .nav-links {
      display: flex; align-items: center; gap: 20px; list-style: none;
    }
    .nav-link {
      font-size: 0.88rem; font-weight: 600; color: var(--muted);
      letter-spacing: 0.04em; transition: color 0.2s ease;
      display: inline-flex; align-items: center; gap: 6px;
    }
    .nav-link:hover, .nav-link.active {
      color: #fff;
    }
    .nav-link.active {
      color: var(--ice-bright);
    }
    .nav-cta {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 10px 18px; border-radius: 999px;
      background: linear-gradient(135deg, var(--ice), var(--ice-deep));
      color: #070210; font-weight: 700; font-size: 0.86rem;
      box-shadow: 0 0 25px rgba(192, 132, 252, 0.4);
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .nav-cta:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 30px rgba(240, 171, 252, 0.6);
      color: #070210;
    }

    /* Hero Section */
    .questbook-hero {
      padding: calc(var(--header-h) + 26px) 0 20px;
      text-align: center;
    }
    .badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 6px 14px; border-radius: 999px;
      background: rgba(192, 132, 252, 0.12);
      border: 1px solid var(--line);
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.78rem; letter-spacing: 0.12em;
      text-transform: uppercase; color: var(--ice-bright);
      margin-bottom: 14px;
    }
    .badge-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: var(--good);
      box-shadow: 0 0 10px var(--good);
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(0.85); }
    }

    .hero-title {
      font-family: 'Oswald', sans-serif;
      font-size: clamp(2.2rem, 5vw, 3.6rem);
      font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.04em; line-height: 1.1;
      margin-bottom: 12px;
    }
    .hero-title .glow {
      background: linear-gradient(135deg, #fff 20%, var(--ice-bright) 60%, var(--cyan) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      text-shadow: 0 0 40px rgba(192, 132, 252, 0.45);
    }
    .hero-sub {
      max-width: 760px; margin: 0 auto 24px;
      font-size: 1.05rem; color: var(--muted);
      line-height: 1.6;
    }

    /* Tab Switcher (Navigation across Main Modes) */
    .view-tabs {
      display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
      margin-bottom: 26px;
    }
    .vtab-btn {
      padding: 12px 22px; border-radius: 14px;
      background: rgba(22, 11, 40, 0.75);
      border: 1px solid var(--line);
      color: var(--muted); font-family: 'Oswald', sans-serif;
      font-size: 1.02rem; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.05em; cursor: pointer; transition: all 0.25s var(--ease);
      display: inline-flex; align-items: center; gap: 8px;
    }
    .vtab-btn:hover {
      background: rgba(192, 132, 252, 0.15);
      border-color: var(--ice-bright);
      color: #fff;
    }
    .vtab-btn.active {
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(56, 189, 248, 0.15));
      border-color: var(--ice-bright);
      color: #fff;
      box-shadow: 0 0 25px rgba(192, 132, 252, 0.35);
    }

    /* Global Stats Bar */
    .stats-bar {
      display: grid; grid-template-columns: 2fr 1fr 1fr auto;
      gap: 16px; align-items: center;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 18px 24px; margin-bottom: 28px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    }
    .stat-progress-box {
      display: flex; flex-direction: column; gap: 8px;
    }
    .spb-text {
      display: flex; justify-content: space-between; align-items: center;
      font-size: 0.85rem; font-weight: 600;
    }
    .spb-text span:first-child { color: var(--muted); font-family: 'Share Tech Mono', monospace; text-transform: uppercase; }
    .spb-text span:last-child { color: var(--ice-bright); font-family: 'Share Tech Mono', monospace; font-size: 0.95rem; }
    .bar-bg {
      width: 100%; height: 10px; background: rgba(255,255,255,0.06);
      border-radius: 999px; overflow: hidden;
    }
    .bar-fill {
      height: 100%; width: 0%;
      background: linear-gradient(90deg, var(--ice-deep), var(--ice), var(--cyan));
      border-radius: 999px; transition: width 0.4s var(--ease);
      box-shadow: 0 0 12px rgba(192, 132, 252, 0.6);
    }
    .stat-pill {
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--line-2);
      border-radius: 12px; padding: 10px 14px;
      text-align: center;
    }
    .stat-pill small {
      display: block; font-family: 'Share Tech Mono', monospace;
      font-size: 0.68rem; color: var(--muted-2); text-transform: uppercase;
    }
    .stat-pill strong {
      font-family: 'Oswald', sans-serif; font-size: 1.15rem; color: #fff;
    }
    .btn-reset-stat {
      background: rgba(244, 63, 94, 0.1);
      border: 1px solid rgba(244, 63, 94, 0.3);
      padding: 10px 14px; border-radius: 12px;
      color: #fecdd3; font-size: 0.78rem; font-weight: 600;
      cursor: pointer; transition: all 0.2s; white-space: nowrap;
    }
    .btn-reset-stat:hover {
      background: rgba(244, 63, 94, 0.25);
      border-color: rgba(244, 63, 94, 0.6);
    }

    /* Content Views */
    .view-content { display: none; }
    .view-content.active { display: block; animation: fadeIn 0.3s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

    /* Questbook Layout: Sidebar + Canvas */
    .questbook-layout {
      display: grid; grid-template-columns: 310px 1fr;
      gap: 24px; align-items: start;
      margin-bottom: 70px;
    }

    /* Sidebar Chapters */
    .chapter-sidebar {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 16px;
      position: sticky; top: calc(var(--header-h) + 16px);
      max-height: calc(100vh - var(--header-h) - 32px);
      overflow-y: auto;
      display: flex; flex-direction: column; gap: 8px;
    }
    .sidebar-head {
      font-family: 'Oswald', sans-serif;
      font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.08em; padding: 8px 10px 12px;
      border-bottom: 1px dashed var(--line-2);
      color: #fff; display: flex; align-items: center; justify-content: space-between;
    }
    .sidebar-head small {
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; color: var(--ice);
    }

    .chapter-btn {
      width: 100%; text-align: left;
      background: rgba(255,255,255,0.03);
      border: 1px solid transparent;
      border-radius: 14px; padding: 12px 14px;
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      cursor: pointer; transition: all 0.2s var(--ease);
    }
    .chapter-btn:hover {
      background: rgba(192, 132, 252, 0.1);
      border-color: rgba(192, 132, 252, 0.3);
    }
    .chapter-btn.active {
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.22), rgba(56, 189, 248, 0.12));
      border-color: var(--ice-bright);
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.25);
    }
    .ch-info {
      display: flex; align-items: center; gap: 10px;
    }
    .ch-icon {
      font-size: 1.3rem; flex-shrink: 0; width: 28px; text-align: center;
    }
    .ch-text h4 {
      font-family: 'Oswald', sans-serif; font-size: 0.96rem; font-weight: 600;
      color: #fff; line-height: 1.2; text-transform: uppercase;
    }
    .ch-text small {
      font-size: 0.72rem; color: var(--muted-2);
      font-family: 'Share Tech Mono', monospace;
    }
    .ch-badge {
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
      padding: 4px 8px; border-radius: 8px;
      background: rgba(255,255,255,0.05); color: var(--muted);
      white-space: nowrap;
    }
    .chapter-btn.active .ch-badge {
      background: rgba(192, 132, 252, 0.25); color: var(--ice-bright);
    }

    /* Main Quest Workspace */
    .quest-workspace {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 28px;
      box-shadow: 0 20px 70px rgba(0,0,0,0.5);
      position: relative;
    }

    .current-chapter-header {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
      margin-bottom: 24px; padding-bottom: 20px;
      border-bottom: 1px solid var(--line-2);
    }
    .cch-title-wrap {
      display: flex; gap: 16px; align-items: center;
    }
    .cch-icon-large {
      width: 58px; height: 58px; border-radius: 16px;
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(56, 189, 248, 0.15));
      border: 1px solid var(--line);
      display: grid; place-items: center; font-size: 28px;
      box-shadow: 0 0 25px rgba(192, 132, 252, 0.3);
      flex-shrink: 0;
    }
    .cch-meta h2 {
      font-family: 'Oswald', sans-serif; font-size: 1.7rem; font-weight: 700;
      text-transform: uppercase; color: #fff; line-height: 1.15;
    }
    .cch-meta p {
      font-size: 0.92rem; color: var(--muted); margin-top: 4px; max-width: 600px;
    }

    .quest-search-row {
      margin-bottom: 24px; position: relative;
    }
    .quest-search-row input {
      width: 100%; padding: 12px 18px 12px 44px;
      background: rgba(7, 2, 16, 0.6);
      border: 1px solid var(--line); border-radius: 14px;
      color: #fff; font-size: 0.94rem;
    }
    .quest-search-row input:focus {
      outline: none; border-color: var(--ice-bright);
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
    }
    .quest-search-row svg {
      position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
      width: 18px; height: 18px; color: var(--muted);
    }

    .quests-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }

    .quest-card {
      background: var(--panel-card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 18px 20px;
      cursor: pointer;
      display: flex; flex-direction: column; justify-content: space-between;
      gap: 14px;
      transition: all 0.25s var(--ease);
      position: relative; overflow: hidden;
    }
    .quest-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, transparent, var(--ice), transparent);
      opacity: 0; transition: opacity 0.25s;
    }
    .quest-card:hover {
      background: var(--panel-hover);
      border-color: var(--ice-bright);
      transform: translateY(-2px);
      box-shadow: 0 12px 30px rgba(147, 51, 234, 0.2);
    }
    .quest-card:hover::before { opacity: 1; }

    .quest-card.completed {
      border-color: rgba(52, 211, 153, 0.5);
      background: linear-gradient(180deg, rgba(16, 36, 32, 0.8), rgba(12, 22, 26, 0.9));
    }
    .quest-card.completed::before {
      background: linear-gradient(90deg, transparent, var(--good), transparent);
      opacity: 1;
    }

    .qc-top {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    }
    .qc-badge-title {
      display: flex; align-items: flex-start; gap: 12px;
    }
    .qc-icon {
      width: 38px; height: 38px; border-radius: 10px;
      background: rgba(192, 132, 252, 0.15);
      border: 1px solid var(--line);
      display: flex; align-items: center; justify-content: center;
      font-size: 18px;
      flex-shrink: 0;
      overflow: hidden;
      box-sizing: border-box;
      padding: 3px;
      position: relative;
    }
    .quest-card.completed .qc-icon {
      background: rgba(52, 211, 153, 0.2);
      border-color: var(--good);
      color: var(--good);
    }
    .qc-icon img,
    .qc-icon .item-icon-pixel {
      width: 100% !important;
      height: 100% !important;
      max-width: 100% !important;
      max-height: 100% !important;
      object-fit: contain !important;
      image-rendering: pixelated !important;
      image-rendering: -moz-crisp-edges !important;
      image-rendering: crisp-edges !important;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
      display: block;
    }
    .qc-title-wrap h4 {
      font-family: 'Oswald', sans-serif; font-size: 1.05rem; font-weight: 600;
      color: #fff; line-height: 1.25; text-transform: uppercase;
    }
    .qc-title-wrap p {
      font-size: 0.82rem; color: var(--muted); margin-top: 4px;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .qc-check-btn {
      width: 28px; height: 28px; border-radius: 8px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--line);
      display: grid; place-items: center;
      font-size: 13px; color: var(--muted);
      cursor: pointer; transition: all 0.2s;
      flex-shrink: 0;
    }
    .qc-check-btn:hover {
      background: rgba(192, 132, 252, 0.25);
      border-color: var(--ice-bright);
    }
    .quest-card.completed .qc-check-btn {
      background: var(--good);
      border-color: var(--good);
      color: #070210;
    }

    .qc-footer {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      padding-top: 10px; border-top: 1px dashed var(--line-2);
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
    }
    .qc-target { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .qc-reward { color: var(--gold); white-space: nowrap; }

    /* CODEX & GUIDES CARDS */
    .wiki-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 20px; margin-bottom: 50px;
    }
    .wiki-card {
      background: var(--panel-card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 24px;
      transition: all 0.25s var(--ease);
      display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
    }
    .wiki-card:hover {
      background: var(--panel-hover);
      border-color: var(--ice-bright);
      transform: translateY(-2px);
      box-shadow: 0 16px 40px rgba(147, 51, 234, 0.25);
    }
    .wc-head {
      display: flex; align-items: center; gap: 14px;
    }
    .wc-icon {
      width: 46px; height: 46px; border-radius: 12px;
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(56, 189, 248, 0.15));
      border: 1px solid var(--line);
      display: grid; place-items: center; font-size: 22px;
      flex-shrink: 0;
    }
    .wc-title h3 {
      font-family: 'Oswald', sans-serif; font-size: 1.25rem; font-weight: 700;
      text-transform: uppercase; color: #fff; line-height: 1.2;
    }
    .wc-title small {
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
      color: var(--ice-bright); text-transform: uppercase;
    }
    .wc-body {
      color: var(--muted); font-size: 0.92rem; line-height: 1.65;
    }
    .wc-craft-box {
      background: rgba(7, 2, 16, 0.8);
      border: 1px solid var(--line-2);
      border-radius: 12px; padding: 10px 14px;
      font-family: 'Share Tech Mono', monospace; font-size: 0.8rem;
      color: var(--cyan); display: flex; justify-content: space-between; align-items: center;
    }
    .wc-craft-box span { color: var(--gold); }
    .btn-copy-craft {
      background: rgba(192, 132, 252, 0.2);
      border: 1px solid var(--line); border-radius: 8px;
      padding: 4px 10px; color: #fff; font-size: 0.72rem;
      cursor: pointer; transition: 0.2s;
    }
    .btn-copy-craft:hover { background: var(--ice); color: #070210; }

    /* Modal / Inspector Drawer */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 2000;
      background: rgba(4, 1, 10, 0.84);
      backdrop-filter: blur(12px);
      display: none; align-items: center; justify-content: center;
      padding: 20px;
    }
    .modal-overlay.open {
      display: flex; animation: modalFade 0.25s var(--ease);
    }
    @keyframes modalFade {
      from { opacity: 0; transform: scale(0.96); }
      to { opacity: 1; transform: scale(1); }
    }

    .quest-modal {
      background: linear-gradient(180deg, #180a32 0%, #0d041c 100%);
      border: 1px solid var(--ice);
      border-radius: var(--radius-lg);
      width: min(640px, 100%);
      padding: 32px;
      box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 50px rgba(192, 132, 252, 0.3);
      position: relative;
    }
    .btn-modal-close {
      position: absolute; top: 20px; right: 20px;
      width: 36px; height: 36px; border-radius: 10px;
      background: rgba(255,255,255,0.06); border: 1px solid var(--line);
      display: grid; place-items: center; font-size: 16px;
      color: var(--muted); cursor: pointer; transition: 0.2s;
    }
    .btn-modal-close:hover {
      background: rgba(244, 63, 94, 0.2);
      border-color: rgba(244, 63, 94, 0.5);
      color: #fff;
    }

    .qm-head {
      display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
    }
    .qm-icon {
      width: 52px; height: 52px; border-radius: 14px;
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(56, 189, 248, 0.2));
      border: 1px solid var(--line);
      display: grid; place-items: center; font-size: 24px;
      flex-shrink: 0;
    }
    .qm-titles h3 {
      font-family: 'Oswald', sans-serif; font-size: 1.5rem; font-weight: 700;
      text-transform: uppercase; color: #fff; line-height: 1.2;
    }
    .qm-titles small {
      font-family: 'Share Tech Mono', monospace; font-size: 0.76rem;
      color: var(--ice-bright); text-transform: uppercase;
    }

    .qm-desc {
      background: rgba(7, 2, 16, 0.6);
      border: 1px solid var(--line-2);
      border-radius: 14px; padding: 18px 20px;
      font-size: 0.95rem; line-height: 1.65; color: var(--text);
      margin-bottom: 20px;
    }

    .qm-tasks-rewards {
      display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
      margin-bottom: 24px;
    }
    .qm-box {
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--line-2); border-radius: 12px;
      padding: 14px;
    }
    .qm-box h5 {
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
      text-transform: uppercase; letter-spacing: 0.08em;
      margin-bottom: 6px; color: var(--muted-2);
    }
    .qm-box p {
      font-size: 0.88rem; font-weight: 600; color: #fff;
    }

    .qm-actions {
      display: flex; gap: 12px; justify-content: flex-end;
    }
    .btn-complete-modal {
      padding: 12px 24px; border-radius: 12px;
      background: linear-gradient(135deg, var(--good), #059669);
      color: #070210; font-weight: 700; font-size: 0.92rem;
      border: none; cursor: pointer; transition: all 0.2s;
      display: inline-flex; align-items: center; gap: 8px;
    }
    .btn-complete-modal:hover {
      box-shadow: 0 0 25px rgba(52, 211, 153, 0.5);
      transform: translateY(-1px);
    }

    /* Footer */
    footer {
      border-top: 1px solid var(--line-2);
      padding: 50px 0 40px;
      text-align: center; color: var(--muted-2);
      font-size: 0.88rem; position: relative; z-index: 2;
    }
    footer a { color: var(--ice); }
    footer a:hover { text-decoration: underline; }
    .footer-donate {
      display: inline-flex; align-items: center; gap: 8px;
      margin-top: 14px; padding: 9px 22px;
      background: rgba(192, 132, 252, 0.08);
      border: 1px solid rgba(192, 132, 252, 0.32);
      border-radius: 999px;
      color: var(--ice) !important; font-size: 0.86rem; font-weight: 600;
      text-decoration: none !important; letter-spacing: 0.03em;
      transition: all 0.25s ease;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    }
    .footer-donate:hover {
      background: rgba(192, 132, 252, 0.22);
      border-color: var(--ice-bright, #f0abfc);
      color: #fff !important;
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.45);
      transform: translateY(-2px);
    }

    @media (max-width: 980px) {
      .questbook-layout { grid-template-columns: 1fr; }
      .chapter-sidebar { position: static; max-height: 380px; }
      .stats-bar { grid-template-columns: 1fr; }
      .qm-tasks-rewards { grid-template-columns: 1fr; }
      .nav-links { display: none; }
    }
  
    /* VALORIA CODEX INTERACTIVE SYSTEM */
    .codex-hero-panel {
      background: linear-gradient(135deg, rgba(30, 14, 54, 0.9), rgba(15, 6, 28, 0.95));
      border: 1px solid var(--ice);
      border-radius: var(--radius-lg);
      padding: 24px 28px;
      margin-bottom: 24px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 30px rgba(192, 132, 252, 0.15);
      display: flex; flex-direction: column; gap: 16px;
    }
    .codex-hero-top {
      display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    }
    .codex-title-wrap {
      display: flex; align-items: center; gap: 16px;
    }
    .codex-badge-icon {
      width: 54px; height: 54px; border-radius: 16px;
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(251, 191, 36, 0.2));
      border: 1px solid var(--ice);
      display: grid; place-items: center; font-size: 26px;
      box-shadow: 0 0 25px rgba(192, 132, 252, 0.35);
    }
    .codex-title-wrap h2 {
      font-family: 'Oswald', sans-serif; font-size: 1.6rem; font-weight: 700;
      text-transform: uppercase; color: #fff; line-height: 1.2;
    }
    .codex-title-wrap p {
      font-size: 0.88rem; color: var(--muted); margin-top: 3px;
    }
    .codex-stat-box {
      background: rgba(7, 2, 16, 0.7);
      border: 1px solid var(--line);
      border-radius: 14px; padding: 10px 18px;
      display: flex; align-items: center; gap: 16px;
    }
    .csb-meta small {
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; color: var(--muted-2); display: block;
    }
    .csb-meta strong {
      font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; color: var(--ice-bright); font-weight: 700;
    }
    .codex-bar-wrap {
      width: 130px; height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
    }
    .codex-bar-fill {
      height: 100%; width: 0%; background: linear-gradient(90deg, var(--ice), var(--good)); transition: width 0.3s ease;
    }

    /* Codex Branch Pills Toolbar */
    .codex-branches-bar {
      display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
      scrollbar-width: thin;
    }
    .cbranch-btn {
      padding: 8px 14px; border-radius: 10px;
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--line-2);
      color: var(--muted); font-size: 0.84rem; font-weight: 500;
      white-space: nowrap; cursor: pointer; transition: all 0.2s;
      display: flex; align-items: center; gap: 6px;
    }
    .cbranch-btn:hover {
      background: rgba(192, 132, 252, 0.12);
      border-color: rgba(192, 132, 252, 0.35);
      color: #fff;
    }
    .cbranch-btn.active {
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(56, 189, 248, 0.15));
      border-color: var(--ice-bright);
      color: #fff;
      box-shadow: 0 0 15px rgba(192, 132, 252, 0.25);
    }
    .cbranch-count {
      font-family: 'Share Tech Mono', monospace; font-size: 0.7rem;
      background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 6px;
    }

    /* Codex Search & Filter Row */
    .codex-filter-row {
      display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    }
    .codex-search-wrap {
      flex: 1; min-width: 260px; position: relative;
    }
    .codex-search-wrap input {
      width: 100%; padding: 10px 16px 10px 42px;
      background: rgba(7, 2, 16, 0.7);
      border: 1px solid var(--line); border-radius: 12px;
      color: #fff; font-size: 0.92rem;
    }
    .codex-search-wrap input:focus {
      outline: none; border-color: var(--ice-bright);
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
    }
    .codex-search-wrap svg {
      position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
      width: 18px; height: 18px; color: var(--muted-2);
    }
    .codex-filter-select {
      background: rgba(7, 2, 16, 0.7);
      border: 1px solid var(--line); border-radius: 12px;
      padding: 10px 14px; color: var(--text); font-size: 0.88rem;
      cursor: pointer;
    }

    /* Codex Card Styles */
    .codex-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 16px; margin-bottom: 50px;
    }
    .codex-card {
      background: var(--panel-card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 20px;
      display: flex; flex-direction: column; justify-content: space-between;
      gap: 14px; transition: all 0.25s var(--ease);
      position: relative; overflow: hidden; cursor: pointer;
    }
    .codex-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, transparent, var(--ice), transparent);
      opacity: 0; transition: opacity 0.25s;
    }
    .codex-card:hover {
      background: var(--panel-hover);
      border-color: var(--ice-bright);
      transform: translateY(-2px);
      box-shadow: 0 14px 35px rgba(147, 51, 234, 0.25);
    }
    .codex-card:hover::before { opacity: 1; }
    .codex-card.completed {
      border-color: rgba(52, 211, 153, 0.45);
      background: linear-gradient(180deg, rgba(16, 36, 32, 0.8), rgba(12, 22, 26, 0.9));
    }
    .codex-card.completed::before {
      background: linear-gradient(90deg, transparent, var(--good), transparent);
      opacity: 1;
    }
    .cc-head {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    }
    .cc-icon-title {
      display: flex; align-items: flex-start; gap: 12px;
    }
    .cc-icon {
      width: 44px; height: 44px; border-radius: 12px;
      background: rgba(192, 132, 252, 0.15);
      border: 1px solid var(--line);
      display: flex; align-items: center; justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
      overflow: hidden;
      box-sizing: border-box;
      padding: 4px;
      position: relative;
    }
    .codex-card.completed .cc-icon {
      background: rgba(52, 211, 153, 0.2);
      border-color: var(--good);
    }
    .cc-icon img,
    .cc-icon .item-icon-pixel {
      width: 100% !important;
      height: 100% !important;
      max-width: 100% !important;
      max-height: 100% !important;
      object-fit: contain !important;
      image-rendering: pixelated !important;
      image-rendering: -moz-crisp-edges !important;
      image-rendering: crisp-edges !important;
      filter: drop-shadow(0 2px 5px rgba(0,0,0,0.85));
      display: block;
    }
    .cc-title-meta small {
      font-family: 'Share Tech Mono', monospace; font-size: 0.7rem;
      color: var(--ice-bright); text-transform: uppercase; display: block; margin-bottom: 2px;
    }
    .cc-title-meta h4 {
      font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 700;
      color: #fff; line-height: 1.25; text-transform: uppercase;
    }
    .cc-check-btn {
      width: 28px; height: 28px; border-radius: 8px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--line);
      display: grid; place-items: center;
      font-size: 13px; color: var(--muted);
      cursor: pointer; transition: all 0.2s;
      flex-shrink: 0;
    }
    .cc-check-btn:hover {
      background: rgba(192, 132, 252, 0.25);
      border-color: var(--ice-bright);
    }
    .codex-card.completed .cc-check-btn {
      background: var(--good); border-color: var(--good); color: #070210;
    }
    .cc-hint-box {
      background: rgba(7, 2, 16, 0.7);
      border: 1px solid rgba(192, 132, 252, 0.2);
      border-radius: 10px; padding: 8px 12px;
      font-size: 0.82rem; color: #fff; line-height: 1.4;
      display: flex; align-items: flex-start; gap: 8px;
    }
    .cc-hint-box span { color: var(--cyan); font-weight: 700; flex-shrink: 0; }
    .cc-body-preview {
      font-size: 0.86rem; color: var(--muted); line-height: 1.5;
      display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .cc-foot {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      padding-top: 10px; border-top: 1px dashed var(--line-2);
      font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
    }
    .cc-read-link {
      color: var(--ice); font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
    }
    .cc-read-link:hover { color: var(--ice-bright); text-decoration: underline; }

  
    /* SEGMENTED MASTER NAVIGATION (КВЕСТЫ vs ГАЙДЫ) */
    .view-tabs-master {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-bottom: 24px;
    }
    .vtab-clusters {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      justify-content: center;
    }
    .vtab-cluster {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 16px;
      background: rgba(14, 7, 26, 0.7);
      border: 1px solid var(--line);
      box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }
    .vtab-cluster-label {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 4px 8px;
      border-radius: 8px;
      font-weight: 700;
    }
    .cluster-quests .vtab-cluster-label {
      background: rgba(192, 132, 252, 0.18);
      color: var(--ice-bright);
    }
    .cluster-guides .vtab-cluster-label {
      background: rgba(251, 191, 36, 0.18);
      color: var(--gold);
    }
    .cluster-crafts {
      border-color: rgba(56, 189, 248, 0.3);
      background: rgba(10, 18, 32, 0.8);
      box-shadow: 0 4px 24px rgba(56, 189, 248, 0.15);
    }
    .cluster-crafts .vtab-cluster-label {
      background: rgba(56, 189, 248, 0.2);
      color: #38bdf8;
      border: 1px solid rgba(56, 189, 248, 0.35);
    }
    .cluster-crafts .vtab-btn:hover {
      background: rgba(56, 189, 248, 0.12);
      border-color: rgba(56, 189, 248, 0.35);
      color: #e0f2fe;
    }
    .cluster-crafts .vtab-btn.active {
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(14, 165, 233, 0.15));
      border-color: #38bdf8;
      color: #fff;
      box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    }
    .vtab-btn {
      padding: 10px 18px;
      border-radius: 12px;
      background: rgba(255,255,255,0.03);
      border: 1px solid transparent;
      color: var(--muted);
      font-family: 'Oswald', sans-serif;
      font-weight: 600;
      font-size: 0.95rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      cursor: pointer;
      transition: all 0.25s var(--ease);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
    }
    .vtab-btn:hover {
      background: rgba(192, 132, 252, 0.12);
      border-color: rgba(192, 132, 252, 0.3);
      color: #fff;
    }
    .vtab-btn.active {
      background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(56, 189, 248, 0.15));
      border-color: var(--ice-bright);
      color: #fff;
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.35);
    }
    .cluster-guides .vtab-btn.active {
      background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(244, 63, 94, 0.15));
      border-color: var(--gold);
      box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
    }

    /* STARCATCHER GUIDEBOOK STYLES */
    .starcatcher-hero {
      background: linear-gradient(135deg, rgba(20, 30, 60, 0.9), rgba(10, 15, 35, 0.95));
      border: 1px solid var(--cyan);
      border-radius: var(--radius-lg);
      padding: 28px 32px;
      margin-bottom: 28px;
      box-shadow: 0 15px 50px rgba(0,0,0,0.6), 0 0 35px rgba(56, 189, 248, 0.2);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      flex-wrap: wrap;
    }
    .starcatcher-title-wrap {
      display: flex;
      align-items: center;
      gap: 18px;
    }
    .starcatcher-icon {
      width: 60px;
      height: 60px;
      border-radius: 18px;
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(192, 132, 252, 0.25));
      border: 1px solid var(--cyan);
      display: grid;
      place-items: center;
      font-size: 30px;
      box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    }
    .starcatcher-meta h2 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.7rem;
      font-weight: 700;
      text-transform: uppercase;
      color: #fff;
      line-height: 1.2;
    }
    .starcatcher-meta p {
      font-size: 0.92rem;
      color: var(--muted);
      margin-top: 4px;
      max-width: 680px;
      font-style: italic;
    }
    .sc-badge-guide {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.74rem;
      padding: 6px 14px;
      border-radius: 10px;
      background: rgba(56, 189, 248, 0.15);
      border: 1px solid var(--cyan);
      color: var(--cyan);
      white-space: nowrap;
    }

    .legendary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 18px;
      margin-top: 24px;
    }
    .legend-card {
      background: linear-gradient(180deg, rgba(26, 18, 50, 0.85), rgba(14, 8, 30, 0.95));
      border: 1px solid rgba(251, 191, 36, 0.35);
      border-radius: var(--radius);
      padding: 20px;
      position: relative;
      overflow: hidden;
      transition: all 0.25s var(--ease);
    }
    .legend-card:hover {
      border-color: var(--gold);
      transform: translateY(-2px);
      box-shadow: 0 14px 35px rgba(251, 191, 36, 0.25);
    }
    .legend-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, transparent, var(--gold), transparent);
    }
    .legend-head {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }
    .legend-head-icon {
      font-size: 24px;
    }
    .legend-title h4 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.15rem;
      font-weight: 700;
      color: #fff;
      text-transform: uppercase;
    }
    .legend-title small {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      color: var(--gold);
      display: block;
    }
    .legend-biome {
      background: rgba(7, 2, 16, 0.7);
      border: 1px solid var(--line-2);
      border-radius: 8px;
      padding: 6px 10px;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.76rem;
      color: var(--cyan);
      margin-bottom: 10px;
    }
    .legend-desc {
      font-size: 0.86rem;
      color: var(--muted);
      line-height: 1.5;
    }

  
    /* ===================================================
       STARCATCHER INTERACTIVE IN-GAME GUIDEBOOK STYLES
       =================================================== */
    .sc-book-container {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    /* Top Action Bar */
    .sc-action-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      background: rgba(14, 7, 26, 0.85);
      border: 1px solid var(--line);
      padding: 14px 22px;
      border-radius: var(--radius);
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    .sc-bar-title {
      display: flex;
      align-items: center;
      gap: 14px;
    }
    .sc-bar-title img {
      width: 36px;
      height: 36px;
      image-rendering: pixelated;
      filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
    }
    .sc-bar-title h3 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.25rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #fff;
    }
    .sc-bar-title p {
      font-size: 0.84rem;
      color: var(--muted);
    }

    .sc-bar-controls {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .sc-view-modes {
      display: flex;
      background: rgba(0,0,0,0.4);
      padding: 4px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.06);
    }
    .sc-mode-btn {
      padding: 6px 14px;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--muted);
      font-family: 'Oswald', sans-serif;
      text-transform: uppercase;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s var(--ease);
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .sc-mode-btn.active {
      background: var(--ice-deep);
      color: #fff;
      box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
    }

    .sc-search-box {
      position: relative;
      min-width: 260px;
    }
    .sc-search-box input {
      width: 100%;
      padding: 8px 14px 8px 34px;
      background: rgba(0,0,0,0.45);
      border: 1px solid var(--line);
      border-radius: 10px;
      color: #fff;
      font-size: 0.88rem;
    }
    .sc-search-box input:focus {
      outline: none;
      border-color: var(--cyan);
      box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
    }
    .sc-search-box span {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 0.9rem;
      color: var(--muted);
      pointer-events: none;
    }

    /* THE REALISTIC IN-GAME BOOK FRAME */
    /* THE REALISTIC IN-GAME BOOK FRAME */
    .sc-book-outer {
      position: relative;
      margin: 10px auto;
      max-width: 1220px;
      width: 100%;
      box-sizing: border-box;
    }

    /* Ribbon Tabs at Top of the Book */
    .sc-ribbons {
      display: flex;
      gap: 6px;
      padding: 0 16px 6px 16px;
      margin-bottom: -6px;
      position: relative;
      z-index: 3;
      width: 100%;
      box-sizing: border-box;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: thin;
      scrollbar-color: rgba(192, 132, 252, 0.35) transparent;
      -webkit-overflow-scrolling: touch;
    }
    .sc-ribbons::-webkit-scrollbar {
      height: 4px;
      display: block;
    }
    .sc-ribbons::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.25);
      border-radius: 4px;
    }
    .sc-ribbons::-webkit-scrollbar-thumb {
      background: rgba(192, 132, 252, 0.4);
      border-radius: 4px;
    }
    .sc-ribbons::-webkit-scrollbar-thumb:hover {
      background: rgba(192, 132, 252, 0.8);
    }
    .sc-ribbon {
      flex: 1 1 0px;
      min-width: max-content;
      justify-content: center;
      text-align: center;
      padding: 7px 10px 9px;
      border-radius: 12px 12px 0 0;
      font-family: 'Oswald', sans-serif;
      text-transform: uppercase;
      font-size: 0.80rem;
      letter-spacing: 0.02em;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      border: 2px solid transparent;
      border-bottom: none;
      color: #d1c5b0;
      background: #181124;
      box-sizing: border-box;
      flex-shrink: 0;
    }
    .sc-ribbon:hover {
      color: #fff;
      transform: translateY(-2px);
    }
    .sc-ribbon.active {
      color: #fff;
      background: #2b2140;
      border-color: var(--cyan);
      box-shadow: 0 -4px 15px rgba(56, 189, 248, 0.4);
      transform: translateY(-1px);
    }
    .sc-ribbon.tab-fish { background: #162438; }
    .sc-ribbon.tab-fish.active { background: #223f66; color: #fff; border-color: var(--cyan); box-shadow: 0 -4px 15px rgba(56, 189, 248, 0.4); }
    .sc-ribbon.tab-mech { background: #332314; }
    .sc-ribbon.tab-mech.active { background: #5a3818; color: #fff; border-color: var(--gold); box-shadow: 0 -4px 15px rgba(251, 191, 36, 0.4); }
    .sc-ribbon.tab-rods { background: #2a1538; }
    .sc-ribbon.tab-rods.active { background: #4f2270; color: #fff; border-color: var(--ice-bright); box-shadow: 0 -4px 15px rgba(192, 132, 252, 0.4); }
    .sc-ribbon.tab-hooks { background: #381520; }
    .sc-ribbon.tab-hooks.active { background: #691d33; color: #fff; border-color: var(--danger); box-shadow: 0 -4px 15px rgba(244, 63, 94, 0.4); }
    .sc-ribbon.tab-relics { background: #142e20; }
    .sc-ribbon.tab-relics.active { background: #1b5738; color: #fff; border-color: var(--good); box-shadow: 0 -4px 15px rgba(52, 211, 153, 0.4); }

    /* Grimoire Ribbons specific colors and compact spacing for 8 tabs */
    .grimoire-ribbons .sc-ribbon {
      padding: 7px 8px 9px;
      font-size: 0.77rem;
      gap: 5px;
      background: #0c241b;
    }
    .grimoire-ribbons .sc-ribbon:hover { background: #153b2d; color: #fff; }
    .grimoire-ribbons .sc-ribbon.active { background: #1e5940; color: #fff; border-color: #34d399; box-shadow: 0 -4px 15px rgba(52, 211, 153, 0.4); }

    /* Bestiary Ribbons specific colors */
    .boss-ribbons .sc-ribbon { background: #24090b; }
    .boss-ribbons .sc-ribbon:hover { background: #3b0f13; color: #fff; }
    .boss-ribbons .sc-ribbon.active { background: #54161c; color: #fff; border-color: #f43f5e; box-shadow: 0 -4px 15px rgba(244, 63, 94, 0.4); }

    @media (max-width: 1100px) {
      .sc-ribbon {
        padding: 6px 8px 8px;
        font-size: 0.76rem;
        gap: 4px;
      }
      .sc-ribbons {
        gap: 4px;
        padding-left: 10px;
        padding-right: 10px;
      }
    }

    /* Leather Book Binding Cover */
    .sc-book-leather {
      position: relative;
      background: radial-gradient(circle at 50% 30%, #3a1e12 0%, #1f0f08 85%, #150904 100%);
      border: 4px solid #5a321c;
      border-radius: 28px;
      padding: 22px;
      box-shadow: 0 30px 90px rgba(0,0,0,0.85), inset 0 0 50px rgba(0,0,0,0.8), 0 0 35px rgba(56, 189, 248, 0.15);
      box-sizing: border-box;
    }
    /* Brass Corner Metal Studs */
    .sc-book-leather::before, .sc-book-leather::after {
      content: '';
      position: absolute;
      width: 32px;
      height: 32px;
      border: 4px solid #d4973b;
      border-radius: 8px;
      pointer-events: none;
      z-index: 4;
    }
    .sc-book-leather::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
    .sc-book-leather::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

    /* Open Dual-Page Spread (Parchment Paper) - FIXED ROCK-SOLID HEIGHT */
    .sc-parchment-spread {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: minmax(0, 1fr) !important;
      gap: 16px;
      background: #ece0c8;
      background: linear-gradient(180deg, #f2e7d0 0%, #e8d9bc 100%);
      border-radius: 18px;
      box-shadow: inset 0 0 45px rgba(97, 60, 26, 0.25), 0 8px 30px rgba(0,0,0,0.5);
      border: 2px solid #bba37f;
      height: 640px !important;
      min-height: 640px !important;
      max-height: 640px !important;
      position: relative;
      overflow: hidden;
      box-sizing: border-box;
    }
    /* Central Spine Shadow & Stitching */
    .sc-parchment-spread::after {
      content: '';
      position: absolute;
      top: 0; bottom: 0; left: 50%;
      width: 24px;
      transform: translateX(-50%);
      background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(0,0,0,0.03) 50%, rgba(0,0,0,0.18));
      box-shadow: 0 0 10px rgba(0,0,0,0.25);
      pointer-events: none;
    }

    /* Individual Book Pages - FIXED CONTAINER WITH STABLE SCROLLBAR */
    .sc-book-page {
      padding: 24px 22px 28px;
      color: #2c2117;
      display: flex;
      flex-direction: column;
      min-height: 0 !important;
      height: 100% !important;
      max-height: 100% !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
      scrollbar-gutter: stable;
      scrollbar-width: thin;
      scrollbar-color: #baa37f rgba(80, 50, 20, 0.08);
      position: relative;
      box-sizing: border-box;
    }
    .sc-book-page::-webkit-scrollbar {
      width: 7px;
      display: block;
    }
    .sc-book-page::-webkit-scrollbar-track {
      background: rgba(80, 50, 20, 0.08);
      border-radius: 4px;
    }
    .sc-book-page::-webkit-scrollbar-thumb {
      background: #baa37f;
      border-radius: 4px;
      border: 1px solid rgba(80, 50, 20, 0.15);
    }
    .sc-book-page::-webkit-scrollbar-thumb:hover {
      background: #8e734c;
    }
    .sc-page-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 2px solid #cfbe9f;
      padding-bottom: 10px;
      margin-bottom: 16px;
    }
    .sc-page-heading h4 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.25rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #3b2816;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .sc-page-num {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.8rem;
      color: #8c7353;
      font-weight: 700;
    }

    /* Left Page: Rarity Filter Pills */
    .sc-filter-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 14px;
    }
    .sc-fpill {
      padding: 4px 10px;
      border-radius: 8px;
      border: 1px solid #bfa987;
      background: rgba(255,255,255,0.45);
      font-size: 0.76rem;
      font-weight: 700;
      cursor: pointer;
      color: #4a3622;
      transition: all 0.2s;
    }
    .sc-fpill:hover {
      background: #fff;
    }
    .sc-fpill.active {
      background: #3b2816;
      color: #f7f1e5;
      border-color: #3b2816;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    .sc-fpill.active.fp-legendary { background: #b45309; color: #fff; }
    .sc-fpill.active.fp-epic { background: #7e22ce; color: #fff; }
    .sc-fpill.active.fp-rare { background: #0369a1; color: #fff; }
    .sc-fpill.active.fp-uncommon { background: #15803d; color: #fff; }

    /* Left Page: Minecraft-Style Inventory Fish Slots */
    .sc-inventory-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
      gap: 8px;
      padding: 10px;
      background: rgba(80, 50, 20, 0.08);
      border: 2px solid #baa27c;
      border-radius: 10px;
      overflow-y: auto;
      flex: 1;
      max-height: 420px;
    }
    .sc-slot {
      width: 50px;
      height: 50px;
      background: #8b8b8b;
      border: 2px solid #373737;
      box-shadow: inset -2px -2px #fff, inset 2px 2px #373737;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .sc-slot:hover {
      transform: scale(1.1);
      z-index: 3;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.7), inset -2px -2px #fff, inset 2px 2px #373737;
    }
    .sc-slot.active {
      box-shadow: 0 0 14px #fbbf24, inset -2px -2px #fbbf24, inset 2px 2px #b45309;
      border-color: #d97706;
      transform: scale(1.06);
    }
    .sc-slot img {
      width: 34px;
      height: 34px;
      image-rendering: pixelated;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
    }
    .sc-slot-badge {
      position: absolute;
      bottom: 2px;
      right: 2px;
      width: 7px;
      height: 7px;
      border-radius: 50%;
    }
    .badge-legendary { background: #fbbf24; box-shadow: 0 0 4px #fbbf24; }
    .badge-epic { background: #c084fc; box-shadow: 0 0 4px #c084fc; }
    .badge-rare { background: #38bdf8; }
    .badge-uncommon { background: #34d399; }
    .badge-common { background: #cbd5e1; }
    .badge-trash { background: #78716c; }

    /* Right Page: Fish Dossier / Polaroid Card */
    .sc-dossier-card {
      background: #ffffff;
      border-radius: 12px;
      padding: 16px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);
      border: 1px solid #dcd1be;
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-bottom: 24px;
    }
    .sc-polaroid-frame {
      background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0a0f18 100%);
      border-radius: 8px;
      height: 140px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      border: 1px solid #1e293b;
      overflow: hidden;
    }
    .sc-polaroid-frame img {
      width: 78px;
      height: 78px;
      image-rendering: pixelated;
      filter: drop-shadow(0 8px 16px rgba(0,0,0,0.8));
      animation: fishFloat 3s ease-in-out infinite alternate;
    }
    @keyframes fishFloat {
      0% { transform: translateY(-4px) rotate(-3deg); }
      100% { transform: translateY(4px) rotate(3deg); }
    }
    .sc-polaroid-tag {
      position: absolute;
      top: 8px;
      right: 8px;
      padding: 3px 8px;
      border-radius: 6px;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .tag-legendary { background: rgba(251, 191, 36, 0.25); color: #fbbf24; border: 1px solid #fbbf24; }
    .tag-epic { background: rgba(192, 132, 252, 0.25); color: #c084fc; border: 1px solid #c084fc; }
    .tag-rare { background: rgba(56, 189, 248, 0.25); color: #38bdf8; border: 1px solid #38bdf8; }
    .tag-uncommon { background: rgba(52, 211, 153, 0.25); color: #34d399; border: 1px solid #34d399; }
    .tag-common { background: rgba(203, 213, 225, 0.25); color: #475569; border: 1px solid #94a3b8; }
    .tag-trash { background: rgba(120, 113, 108, 0.25); color: #78716c; border: 1px solid #78716c; }

    .sc-dossier-meta h3 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.35rem;
      text-transform: uppercase;
      color: #1e1b18;
      margin-bottom: 2px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .sc-dossier-meta small {
      font-family: 'Share Tech Mono', monospace;
      color: #8c7353;
      font-size: 0.8rem;
    }
    .sc-dossier-habitat {
      background: #f5eedf;
      border-left: 3px solid #bfa987;
      padding: 6px 10px;
      border-radius: 0 6px 6px 0;
      font-size: 0.82rem;
      color: #4a3622;
      font-weight: 600;
    }

    /* Stats Grid */
    .sc-stats-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }
    .sc-stat-cell {
      background: #f5eedf;
      border-radius: 6px;
      padding: 6px 8px;
      text-align: center;
      border: 1px solid #e2d5be;
    }
    .sc-stat-cell span {
      display: block;
      font-size: 0.7rem;
      color: #7a6348;
      text-transform: uppercase;
      font-weight: 700;
    }
    .sc-stat-cell strong {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.95rem;
      color: #2b1810;
    }

    .sc-dossier-lore {
      font-size: 0.84rem;
      line-height: 1.5;
      color: #4a3828;
      font-style: italic;
      background: #fbf8f2;
      border: 1px dashed #d5c3a5;
      border-radius: 6px;
      padding: 10px;
    }

    /* Equipment & Chapters Book Pages */
    .sc-item-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 14px;
    }
    .sc-item-card {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255,255,255,0.6);
      border: 1px solid #cfbe9f;
      border-radius: 10px;
      padding: 10px 14px;
      transition: transform 0.15s, background 0.15s;
    }
    .sc-item-card:hover {
      background: #fff;
      transform: translateX(4px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .sc-item-card img {
      width: 40px;
      height: 40px;
      max-width: 40px;
      max-height: 40px;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
      flex-shrink: 0;
    }
    .sc-item-info h5 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.05rem;
      text-transform: uppercase;
      color: #2b1810;
      margin-bottom: 2px;
    }
    .sc-item-info p {
      font-size: 0.82rem;
      color: #5a4330;
      line-height: 1.4;
    }

    /* Book Pagination Buttons */
    .sc-book-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 14px;
      padding-top: 10px;
      border-top: 1px solid #cfbe9f;
    }
    .sc-book-btn {
      padding: 6px 14px;
      border-radius: 8px;
      border: 1px solid #8c7353;
      background: #e8d9bc;
      color: #3b2816;
      font-family: 'Oswald', sans-serif;
      text-transform: uppercase;
      font-size: 0.82rem;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.2s;
    }
    .sc-book-btn:hover {
      background: #fff;
      border-color: #3b2816;
    }

    /* FULL GRID VIEW (Alternative Mode) */
    .sc-fullgrid-view {
      display: none;
      flex-direction: column;
      gap: 20px;
    }
    .sc-fullgrid-view.active {
      display: flex;
    }
    .sc-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }
    .sc-card {
      background: var(--panel-card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: all 0.25s var(--ease);
      cursor: pointer;
    }
    .sc-card:hover {
      transform: translateY(-4px);
      border-color: var(--cyan);
      box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 20px rgba(56, 189, 248, 0.2);
    }
    .sc-card-head {
      display: flex;
      align-items: center;
      gap: 14px;
    }
    .sc-card-icon {
      width: 48px;
      height: 48px;
      background: rgba(0,0,0,0.4);
      border-radius: 10px;
      border: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .sc-card-icon img {
      width: 36px;
      height: 36px;
      image-rendering: pixelated;
    }
    .sc-card-title h4 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.1rem;
      text-transform: uppercase;
      color: #fff;
    }
    .sc-card-title small {
      font-size: 0.78rem;
      color: var(--muted);
    }
    .sc-card-desc {
      font-size: 0.85rem;
      color: var(--muted);
      line-height: 1.5;
    }

    @media (max-width: 900px) {
      .sc-parchment-spread {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        max-height: none;
      }
      .sc-parchment-spread::after {
        display: none;
      }
      .sc-page-left {
        border-right: none;
        border-bottom: 2px solid #cfbe9f;
      }
    }

  
    /* Pixel Art Mod & Minecraft Icons */
    .ch-pixel-img {
      width: 24px;
      height: 24px;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }
    .cch-pixel-img {
      width: 46px;
      height: 46px;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 4px 10px rgba(192, 132, 252, 0.5));
    }
    .qc-pixel-img {
      width: 28px;
      height: 28px;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
    }
    .modal-pixel-img, .modal-icon-badge img {
      width: 44px;
      height: 44px;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 4px 12px rgba(192, 132, 252, 0.6));
    }
    .item-icon-pixel {
      width: 100%;
      height: 100%;
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      display: block;
    }
    .cc-pixel-img {
      width: 32px;
      height: 32px;
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    }
    .mod-icon-img {
      width: 32px;
      height: 32px;
      image-rendering: pixelated;
      image-rendering: -moz-crisp-edges;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
    }

    /* ===================================================
       GRIMOIRE BOOK STYLES (Том Мудрости)
       =================================================== */
    .grimoire-book-leather {
      position: relative;
      background: radial-gradient(circle at 50% 30%, #0d281e 0%, #061711 85%, #030c08 100%);
      border: 4px solid #1f5e43;
      border-radius: 28px;
      padding: 22px;
      box-shadow: 0 30px 90px rgba(0,0,0,0.85), inset 0 0 50px rgba(0,0,0,0.8), 0 0 35px rgba(52, 211, 153, 0.25);
    }
    .grimoire-book-leather::before, .grimoire-book-leather::after {
      content: '';
      position: absolute;
      width: 32px;
      height: 32px;
      border: 4px solid #34d399;
      border-radius: 8px;
      pointer-events: none;
      z-index: 4;
    }
    .grimoire-book-leather::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
    .grimoire-book-leather::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

    /* ===================================================
       BESTIARY BOOK STYLES (Бестиарий Титанов)
       =================================================== */
    .bestiary-book-leather {
      position: relative;
      background: radial-gradient(circle at 50% 30%, #2a0b0e 0%, #170406 85%, #0c0203 100%);
      border: 4px solid #5a181e;
      border-radius: 28px;
      padding: 22px;
      box-shadow: 0 30px 90px rgba(0,0,0,0.85), inset 0 0 50px rgba(0,0,0,0.8), 0 0 35px rgba(244, 63, 94, 0.25);
    }
    .bestiary-book-leather::before, .bestiary-book-leather::after {
      content: '';
      position: absolute;
      width: 32px;
      height: 32px;
      border: 4px solid #f43f5e;
      border-radius: 8px;
      pointer-events: none;
      z-index: 4;
    }
    .bestiary-book-leather::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
    .bestiary-book-leather::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

    /* Topic item cards for left page */
    .book-entry-card {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255,255,255,0.65);
      border: 1px solid #cfbe9f;
      border-radius: 10px;
      padding: 10px 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }
    .book-entry-card:hover {
      background: #ffffff;
      transform: translateX(4px);
      box-shadow: 0 4px 14px rgba(0,0,0,0.1);
      border-color: #9d835b;
    }
    .book-entry-card.active {
      background: #ffffff;
      border-color: #2b1810;
      box-shadow: 0 0 0 2px #2b1810, 0 6px 16px rgba(0,0,0,0.15);
      transform: translateX(6px);
    }
    .book-entry-card.active::before {
      content: '▶';
      position: absolute;
      left: -8px;
      color: #2b1810;
      font-size: 0.75rem;
    }
    .bec-icon {
      width: 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(80, 50, 20, 0.08);
      border-radius: 8px;
      border: 1px solid #baa27c;
      flex-shrink: 0;
    }
    .bec-icon img {
      width: 28px;
      height: 28px;
      image-rendering: pixelated;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    }
    .bec-info {
      flex: 1;
      min-width: 0;
    }
    .bec-info h5 {
      font-family: 'Oswald', sans-serif;
      font-size: 0.98rem;
      text-transform: uppercase;
      color: #2b1810;
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .bec-info small {
      font-size: 0.75rem;
      color: #6d543e;
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Grimoire Right Page Dossier */
    .grimoire-dossier {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding-bottom: 28px;
    }
    .gd-header {
      display: flex;
      align-items: center;
      gap: 14px;
      background: #ffffff;
      padding: 14px;
      border-radius: 12px;
      border: 1px solid #dcd1be;
      box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }
    .gd-header-icon {
      width: 52px;
      height: 52px;
      background: radial-gradient(circle, #2d1e14 0%, #170d07 100%);
      border-radius: 10px;
      border: 2px solid #baa27c;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .gd-header-icon img {
      width: 36px;
      height: 36px;
      image-rendering: pixelated;
      filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
    }
    .gd-titles h3 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.25rem;
      text-transform: uppercase;
      color: #24140b;
      line-height: 1.2;
    }
    .gd-titles small {
      font-size: 0.8rem;
      color: #8c7353;
      font-weight: 600;
    }
    .gd-quote {
      font-style: italic;
      font-size: 0.86rem;
      color: #4a3828;
      background: rgba(255,255,255,0.65);
      border-left: 3px solid #bba37f;
      padding: 8px 12px;
      border-radius: 0 6px 6px 0;
      line-height: 1.45;
    }
    .gd-body {
      font-size: 0.88rem;
      color: #3b2816;
      line-height: 1.55;
      background: #fff;
      padding: 14px;
      border-radius: 10px;
      border: 1px solid #dcd1be;
    }
    .gd-body ul {
      margin: 8px 0 0 18px;
      padding: 0;
    }
    .gd-body li {
      margin-bottom: 6px;
    }
    .gd-box-craft {
      background: #fdfbf7;
      border: 1px dashed #baa27c;
      border-radius: 10px;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .gd-craft-label {
      font-size: 0.82rem;
      color: #634a32;
    }
    .gd-craft-label strong {
      color: #201006;
      font-family: 'Share Tech Mono', monospace;
    }
    .gd-btn-copy {
      padding: 5px 12px;
      background: #3b2816;
      color: #f7f1e5;
      border: none;
      border-radius: 6px;
      font-family: 'Oswald', sans-serif;
      text-transform: uppercase;
      font-size: 0.75rem;
      cursor: pointer;
      transition: background 0.15s;
    }
    .gd-btn-copy:hover {
      background: #170d07;
    }
    .gd-tip-box {
      background: rgba(52, 211, 153, 0.12);
      border: 1px solid rgba(52, 211, 153, 0.4);
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 0.82rem;
      color: #064e3b;
      line-height: 1.4;
    }

    /* Boss Right Page Dossier */
    .boss-dossier {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding-bottom: 28px;
    }
    .boss-portrait-card {
      background: #ffffff;
      border-radius: 12px;
      border: 1px solid #dcd1be;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    }
    .boss-portrait-frame {
      background: radial-gradient(circle at 50% 30%, #301014 0%, #150507 85%, #0a0102 100%);
      border-radius: 10px;
      height: 130px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      border: 2px solid #5a181e;
      overflow: hidden;
    }
    .boss-portrait-frame img {
      width: 72px;
      height: 72px;
      image-rendering: pixelated;
      filter: drop-shadow(0 6px 14px rgba(0,0,0,0.9));
      animation: bossPulse 3s ease-in-out infinite alternate;
    }
    @keyframes bossPulse {
      0% { transform: scale(0.96) translateY(-2px); filter: drop-shadow(0 4px 10px rgba(244,63,94,0.4)); }
      100% { transform: scale(1.05) translateY(2px); filter: drop-shadow(0 8px 18px rgba(244,63,94,0.8)); }
    }
    .boss-danger-tag {
      position: absolute;
      top: 8px;
      right: 8px;
      background: rgba(244, 63, 94, 0.25);
      color: #f43f5e;
      border: 1px solid #f43f5e;
      padding: 2px 8px;
      border-radius: 6px;
      font-size: 0.72rem;
      font-weight: 700;
      font-family: 'Share Tech Mono', monospace;
    }
    .boss-stats-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
    }
    .boss-stat-cell {
      background: #fdfbf7;
      border: 1px solid #e0d4c0;
      border-radius: 6px;
      padding: 6px 8px;
      text-align: center;
    }
    .boss-stat-cell small {
      font-size: 0.7rem;
      color: #8c7353;
      display: block;
      text-transform: uppercase;
      font-weight: 700;
    }
    .boss-stat-cell strong {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.95rem;
      color: #2b1810;
    }
    .boss-details-block {
      background: #ffffff;
      border-radius: 10px;
      border: 1px solid #dcd1be;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-size: 0.85rem;
      color: #3b2816;
    }
    .boss-details-block h6 {
      font-family: 'Oswald', sans-serif;
      font-size: 0.95rem;
      text-transform: uppercase;
      color: #2b1810;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .boss-phase-item {
      background: #fbf9f4;
      border-left: 3px solid #8c7353;
      padding: 6px 10px;
      border-radius: 0 6px 6px 0;
      margin-bottom: 4px;
      line-height: 1.4;
    }
    .boss-phase-item strong {
      color: #201006;
      display: block;
      font-size: 0.82rem;
    }
    .boss-drops-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 6px;
      margin-top: 4px;
    }
    .boss-drop-card {
      display: flex;
      align-items: center;
      gap: 8px;
      background: #fbf9f4;
      border: 1px solid #e0d4c0;
      border-radius: 6px;
      padding: 6px 8px;
    }
    .boss-drop-card img {
      width: 24px;
      height: 24px;
      image-rendering: pixelated;
      flex-shrink: 0;
    }
    .boss-drop-info {
      min-width: 0;
      flex: 1;
    }
    .boss-drop-info small {
      font-size: 0.72rem;
      color: #2b1810;
      font-weight: 700;
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .boss-drop-info span {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.7rem;
      color: #b45309;
      font-weight: 700;
    }

    /* ===================================================
       FTB QUESTS TREE & BRANCHES CANVAS
       =================================================== */
    .quest-view-mode-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
      flex-wrap: wrap;
      gap: 12px;
    }
    .qv-modes {
      display: inline-flex;
      background: rgba(14, 21, 33, 0.85);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 3px;
      gap: 4px;
    }
    .qv-btn {
      padding: 7px 16px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      border-radius: 8px;
      cursor: pointer;
      font-family: 'Oswald', sans-serif;
      text-transform: uppercase;
      font-size: 0.84rem;
      letter-spacing: 0.04em;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .qv-btn.active {
      background: var(--panel-card);
      color: #fff;
      box-shadow: 0 2px 10px rgba(0,0,0,0.5);
      border-color: var(--cyan);
    }
    .qv-btn:hover:not(.active) {
      color: #fff;
      background: rgba(255,255,255,0.05);
    }

    /* FTB Canvas Container with Cosmic Starry Theme */
    .ftb-tree-wrapper {
      position: relative;
      width: 100%;
      height: 640px;
      background: radial-gradient(circle at 50% 35%, #0d1527 0%, #060914 65%, #020409 100%);
      border: 2px solid rgba(56, 189, 248, 0.28);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: inset 0 0 80px rgba(0,0,0,0.95), 0 12px 35px rgba(0,0,0,0.6);
      user-select: none;
    }

    /* Background Cosmic Nebula & Starfield */
    .ftb-grid-bg {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background-image: 
        /* Twinkling star field */
        radial-gradient(1.5px 1.5px at 35px 45px, rgba(255,255,255,0.95), transparent),
        radial-gradient(1px 1px at 115px 165px, rgba(56, 189, 248, 0.85), transparent),
        radial-gradient(2px 2px at 210px 85px, rgba(168, 85, 247, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 330px 240px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 460px 120px, rgba(56, 189, 248, 0.9), transparent),
        radial-gradient(2.2px 2.2px at 560px 290px, rgba(251, 191, 36, 0.8), transparent),
        radial-gradient(1.5px 1.5px at 680px 170px, rgba(244, 114, 182, 0.8), transparent),
        radial-gradient(1px 1px at 790px 320px, rgba(255,255,255,0.85), transparent),
        /* Deep space nebulas */
        radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 75% 65%, rgba(56, 189, 248, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(217, 70, 239, 0.08) 0%, transparent 40%),
        /* Authentic FTB Quests grid lines & coordinate dots */
        radial-gradient(circle at 1px 1px, rgba(56, 189, 248, 0.18) 1.5px, transparent 0),
        linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
      background-size: 
        320px 320px, 420px 420px, 280px 280px, 390px 390px, 520px 520px, 480px 480px, 600px 600px, 450px 450px,
        100% 100%, 100% 100%, 100% 100%,
        38px 38px, 38px 38px, 38px 38px;
      pointer-events: none;
    }

    /* Viewport that transforms (pan & zoom) */
    .ftb-tree-viewport {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      cursor: grab;
      overflow: hidden;
    }
    .ftb-tree-viewport:active {
      cursor: grabbing;
    }
    .ftb-tree-world {
      position: absolute;
      top: 0; left: 0;
      transform-origin: 0 0;
      transition: transform 0.04s linear;
    }

    /* SVG Lines Layer */
    .ftb-lines-svg {
      position: absolute;
      top: 0; left: 0;
      pointer-events: none;
      overflow: visible;
      z-index: 1;
    }
    .ftb-branch-line {
      fill: none;
      stroke: #818cf8;
      stroke-width: 3.5px;
      stroke-linecap: round;
      stroke-linejoin: round;
      filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.75));
      transition: stroke 0.3s, filter 0.3s;
    }
    .ftb-branch-line.completed {
      stroke: #fbbf24;
      stroke-width: 4.5px;
      filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.95));
    }
    .ftb-branch-line.unlocked {
      stroke: #38bdf8;
      stroke-width: 4px;
      stroke-dasharray: 9, 5;
      animation: dashFlow 1.2s linear infinite;
      filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.85));
    }
    @keyframes dashFlow {
      from { stroke-dashoffset: 28; }
      to { stroke-dashoffset: 0; }
    }

    /* FTB Quest Nodes */
    .ftb-node {
      position: absolute;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
      z-index: 3;
      transition: transform 0.2s, filter 0.2s;
    }
    .ftb-node:hover {
      transform: translate(-50%, -50%) scale(1.16);
      z-index: 15;
    }
    .ftb-node-box {
      width: 58px;
      height: 58px;
      background: #141c2b;
      border: 3px solid #475569;
      box-shadow: inset -2px -2px #0a0e17, inset 2px 2px #64748b, 0 8px 22px rgba(0,0,0,0.8);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      padding: 3px;
      box-sizing: border-box;
      transition: all 0.25s;
    }
    .ftb-node-box.shape-diamond {
      transform: rotate(45deg);
      border-radius: 8px;
      border-color: #d97706;
      box-shadow: inset -2px -2px #78350f, inset 2px 2px #fef08a, 0 8px 24px rgba(217, 119, 6, 0.55);
    }
    .ftb-node-box.shape-diamond .ftb-node-img {
      transform: rotate(-45deg);
    }
    .ftb-node-box.shape-circle {
      border-radius: 50%;
    }
    .ftb-node-img {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      pointer-events: none;
    }
    .ftb-node-img img,
    .ftb-node-img .item-icon-pixel,
    .ftb-node-img .item-icon-fallback {
      width: 82% !important;
      height: 82% !important;
      max-width: 84% !important;
      max-height: 84% !important;
      object-fit: contain !important;
      image-rendering: pixelated !important;
      image-rendering: -moz-crisp-edges !important;
      image-rendering: crisp-edges !important;
      filter: drop-shadow(0 2px 5px rgba(0,0,0,0.85));
    }
    /* Completed State */
    .ftb-node.completed .ftb-node-box {
      border-color: #22c55e;
      background: radial-gradient(circle, #14532d 0%, #052e16 100%);
      box-shadow: inset -2px -2px #052e16, inset 2px 2px #86efac, 0 0 20px rgba(34, 197, 94, 0.85);
    }
    .ftb-node.completed .ftb-node-box.shape-diamond {
      border-color: #fbbf24;
      background: radial-gradient(circle, #78350f 0%, #451a03 100%);
      box-shadow: inset -2px -2px #451a03, inset 2px 2px #fef08a, 0 0 26px rgba(251, 191, 36, 0.9);
    }
    .ftb-node-check {
      position: absolute;
      bottom: -4px;
      right: -4px;
      width: 20px;
      height: 20px;
      background: #22c55e;
      color: #052e16;
      border: 2px solid #fff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 900;
      box-shadow: 0 2px 6px rgba(0,0,0,0.6);
      z-index: 5;
    }
    .ftb-node-lock {
      position: absolute;
      top: 50%;
      right: 4px;
      transform: translateY(-50%);
      font-size: 12px;
      opacity: 0.85;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    }
    .ftb-node.locked {
      opacity: 0.65;
      filter: grayscale(0.4);
    }
    .ftb-node.locked .ftb-node-box {
      border-color: #334155;
    }

    /* Node Title underneath */
    .ftb-node-title {
      margin-top: 8px;
      padding: 4px 10px;
      background: rgba(11, 16, 26, 0.92);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 6px;
      font-size: 0.74rem;
      font-weight: 600;
      color: #e2e8f0;
      white-space: normal;
      line-height: 1.25;
      pointer-events: none;
      max-width: 140px;
      text-align: center;
      box-shadow: 0 4px 12px rgba(0,0,0,0.6);
      backdrop-filter: blur(4px);
      word-break: break-word;
    }
    .ftb-node:hover .ftb-node-title {
      color: #fff;
      border-color: var(--cyan);
      background: rgba(11, 16, 26, 0.98);
      box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    }
    .ftb-node.completed .ftb-node-title {
      color: #86efac;
      border-color: rgba(34, 197, 94, 0.5);
    }

    /* Canvas Controls (Zoom, Reset, Info) */
    .ftb-canvas-controls {
      position: absolute;
      bottom: 14px;
      right: 14px;
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(14, 21, 33, 0.92);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 4px 6px;
      box-shadow: 0 4px 18px rgba(0,0,0,0.6);
      z-index: 20;
    }
    .ftb-ctrl-btn {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.06);
      color: #fff;
      font-size: 1.1rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }
    .ftb-ctrl-btn:hover {
      background: rgba(56, 189, 248, 0.25);
      border-color: var(--cyan);
      transform: scale(1.05);
    }
    .ftb-canvas-legend {
      position: absolute;
      top: 14px;
      left: 14px;
      display: flex;
      align-items: center;
      gap: 14px;
      background: rgba(14, 21, 33, 0.88);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 6px 14px;
      font-size: 0.74rem;
      color: var(--muted);
      z-index: 20;
      pointer-events: none;
      backdrop-filter: blur(4px);
    }
    .ftb-canvas-legend span {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }

    /* ==========================================================================
       ИНТЕРАКТИВНЫЙ ВЕРСТАК 3×3 & КАТАЛОГ РЕЦЕПТОВ (JEI) — ASTRAL RPG
       ========================================================================== */
    #view-crafts {
      display: none;
      width: 100%;
      animation: fadeIn 0.3s ease;
    }
    #view-crafts.active {
      display: block;
    }

    .wb-hero-panel {
      background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(12, 10, 24, 0.92));
      border: 1px solid rgba(56, 189, 248, 0.25);
      border-radius: 20px;
      padding: 24px 30px;
      margin-bottom: 24px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
    }
    .wb-hero-title-wrap {
      display: flex;
      align-items: center;
      gap: 18px;
    }
    .wb-hero-icon {
      width: 58px;
      height: 58px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.15));
      border: 2px solid rgba(56, 189, 248, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
      flex-shrink: 0;
    }
    .wb-hero-text h2 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.6rem;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .wb-hero-text p {
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.4;
      max-width: 680px;
    }
    .wb-hero-stats {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 10px 18px;
    }
    .wb-stat-pill {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .wb-stat-pill small {
      font-size: 0.7rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .wb-stat-pill strong {
      font-family: 'Share Tech Mono', monospace;
      font-size: 1.25rem;
      color: #38bdf8;
      font-weight: 700;
    }
    .wb-stat-divider {
      width: 1px;
      height: 28px;
      background: rgba(255, 255, 255, 0.12);
    }

    /* Dual-Pane Layout */
    .wb-main-layout {
      display: grid;
      grid-template-columns: 460px minmax(0, 1fr);
      gap: 24px;
      align-items: start;
    }

    @media (max-width: 1100px) {
      .wb-main-layout {
        grid-template-columns: 1fr;
      }
    }

    /* Left Column: Interactive Workstation Card */
    .wb-station-card {
      position: sticky;
      top: 24px;
      background: linear-gradient(165deg, #1d1b26 0%, #13121b 100%);
      border: 2px solid rgba(147, 197, 253, 0.2);
      border-radius: 20px;
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.08);
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    /* Station Type Mode Switcher */
    .wb-station-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      background: rgba(10, 9, 14, 0.6);
      border-radius: 12px;
      padding: 5px;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .wb-st-btn {
      flex: 1 1 calc(50% - 6px);
      padding: 8px 10px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 8px;
      color: var(--muted);
      font-family: 'Oswald', sans-serif;
      font-size: 0.85rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }
    .wb-st-btn:hover {
      background: rgba(255, 255, 255, 0.05);
      color: #fff;
    }
    .wb-st-btn.active {
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 165, 233, 0.12));
      border-color: rgba(56, 189, 248, 0.5);
      color: #38bdf8;
      box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
    }

    /* Current Recipe Meta in Station */
    .wb-recipe-meta {
      background: rgba(14, 13, 20, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 14px;
      padding: 14px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }
    .wb-meta-info h3 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.2rem;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0.02em;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .wb-meta-info .wb-item-id {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.75rem;
      color: #94a3b8;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: color 0.2s;
    }
    .wb-meta-info .wb-item-id:hover {
      color: #38bdf8;
    }
    .wb-mod-pill {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 20px;
      background: rgba(168, 85, 247, 0.18);
      color: #c084fc;
      border: 1px solid rgba(168, 85, 247, 0.35);
      white-space: nowrap;
      text-transform: uppercase;
    }

    /* Crafting Table Grid Box */
    .wb-craft-stage {
      background: radial-gradient(circle at 50% 50%, #201e2c 0%, #111018 100%);
      border: 2px solid #2e2c3e;
      box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.4);
      border-radius: 16px;
      padding: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      position: relative;
      min-height: 230px;
    }

    /* 3x3 Grid */
    .wb-grid-3x3 {
      display: grid;
      grid-template-columns: repeat(3, 58px);
      grid-template-rows: repeat(3, 58px);
      gap: 6px;
    }

    /* Alternate grids */
    .wb-grid-smithing {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .wb-grid-furnace {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }
    .wb-furnace-flame {
      font-size: 22px;
      animation: flamePulse 1.2s infinite alternate ease-in-out;
      filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.8));
    }
    @keyframes flamePulse {
      0% { transform: scale(0.9); opacity: 0.75; }
      100% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.9)); }
    }

    /* Minecraft Item Slot */
    .wb-slot {
      width: 58px;
      height: 58px;
      background: #2b2838;
      border-top: 3px solid #1c1a24;
      border-left: 3px solid #1c1a24;
      border-bottom: 3px solid #48455c;
      border-right: 3px solid #48455c;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      cursor: pointer;
      transition: all 0.15s ease;
      box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.6);
      user-select: none;
    }
    .wb-slot:hover {
      background: #39354a;
      border-color: #38bdf8;
      box-shadow: 0 0 12px rgba(56, 189, 248, 0.5), inset 1px 1px 4px rgba(0, 0, 0, 0.4);
      transform: scale(1.05);
      z-index: 10;
    }
    .wb-slot.empty {
      cursor: default;
    }
    .wb-slot.empty:hover {
      border-top-color: #1c1a24;
      border-left-color: #1c1a24;
      border-bottom-color: #48455c;
      border-right-color: #48455c;
      background: #2b2838;
      box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.6);
      transform: none;
    }
    .wb-slot img {
      width: 42px;
      height: 42px;
      object-fit: contain;
      image-rendering: pixelated;
      filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
      pointer-events: none;
    }
    .wb-slot-count {
      position: absolute;
      bottom: 2px;
      right: 4px;
      font-family: 'Share Tech Mono', 'Courier New', monospace;
      font-size: 11px;
      font-weight: 700;
      color: #ffffff;
      text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 2px 4px rgba(0,0,0,0.8);
      pointer-events: none;
      z-index: 5;
    }

    /* Animated Recipe Arrow */
    .wb-arrow-assembly {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
    }
    .wb-craft-arrow {
      width: 44px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      color: #38bdf8;
      text-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
      animation: arrowPulse 1.8s infinite ease-in-out;
    }
    @keyframes arrowPulse {
      0%, 100% { transform: translateX(0); opacity: 0.8; }
      50% { transform: translateX(4px); opacity: 1; color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.9); }
    }
    .wb-station-label-small {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.68rem;
      color: var(--muted);
      text-transform: uppercase;
      text-align: center;
    }

    /* Output / Result Slot */
    .wb-result-slot {
      width: 76px;
      height: 76px;
      background: radial-gradient(circle, #362f4e 0%, #1d192c 100%);
      border: 3px solid #fbbf24;
      border-radius: 12px;
      box-shadow: 0 0 24px rgba(251, 191, 36, 0.35), inset 2px 2px 6px rgba(0, 0, 0, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      cursor: pointer;
      transition: all 0.2s;
    }
    .wb-result-slot:hover {
      transform: scale(1.08);
      border-color: #fde047;
      box-shadow: 0 0 32px rgba(251, 191, 36, 0.6), inset 2px 2px 6px rgba(0, 0, 0, 0.7);
    }
    .wb-result-slot img {
      width: 54px;
      height: 54px;
      object-fit: contain;
      image-rendering: pixelated;
      filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
    }
    .wb-count-badge {
      position: absolute;
      bottom: 4px;
      right: 6px;
      font-family: 'Share Tech Mono', monospace;
      font-size: 16px;
      font-weight: 900;
      color: #fff;
      text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
      pointer-events: none;
    }

    /* Floating Item Tooltip */
    .wb-tooltip {
      position: fixed;
      pointer-events: none;
      background: rgba(16, 14, 24, 0.95);
      border: 2px solid #581c87;
      border-radius: 8px;
      padding: 8px 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 16px rgba(168, 85, 247, 0.3);
      z-index: 9999;
      display: none;
      max-width: 280px;
      backdrop-filter: blur(8px);
    }
    .wb-tooltip-title {
      font-family: 'Oswald', sans-serif;
      font-size: 0.95rem;
      font-weight: 700;
      color: #f8fafc;
      margin-bottom: 2px;
    }
    .wb-tooltip-mod {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.75rem;
      color: #c084fc;
      font-style: italic;
    }
    .wb-tooltip-id {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.7rem;
      color: #64748b;
      margin-top: 4px;
    }

    /* Ingredients Breakdown List */
    .wb-ingredients-box {
      background: rgba(14, 13, 20, 0.6);
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      padding: 14px;
    }
    .wb-ing-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      font-size: 0.8rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .wb-ing-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .wb-ing-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 8px;
      padding: 4px 8px;
      font-size: 0.78rem;
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.2s;
    }
    .wb-ing-pill:hover {
      background: rgba(56, 189, 248, 0.15);
      border-color: rgba(56, 189, 248, 0.4);
      color: #38bdf8;
      transform: translateY(-1px);
    }
    .wb-ing-pill img {
      width: 20px;
      height: 20px;
      object-fit: contain;
      image-rendering: pixelated;
    }
    .wb-ing-count {
      font-family: 'Share Tech Mono', monospace;
      font-weight: 700;
      color: #fbbf24;
    }

    /* Action Buttons in Station */
    .wb-actions-row {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .wb-btn-action {
      width: 100%;
      padding: 10px 14px;
      border-radius: 10px;
      font-family: 'Oswald', sans-serif;
      font-weight: 600;
      font-size: 0.9rem;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s;
    }
    .wb-btn-give {
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.1));
      border: 1px solid rgba(56, 189, 248, 0.4);
      color: #38bdf8;
    }
    .wb-btn-give:hover {
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(14, 165, 233, 0.2));
      border-color: #38bdf8;
      color: #fff;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
    }
    .wb-btn-lookup {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--muted);
    }
    .wb-btn-lookup:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #fff;
      border-color: rgba(255, 255, 255, 0.2);
    }

    /* Right Column: JEI Recipe Book & Catalog */
    .wb-catalog-wrap {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    /* Filter & Search Bar */
    .wb-controls-card {
      background: rgba(18, 16, 26, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      padding: 16px 20px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .wb-search-row {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }
    .wb-search-input-wrap {
      flex: 1;
      min-width: 240px;
      position: relative;
      display: flex;
      align-items: center;
    }
    .wb-search-icon {
      position: absolute;
      left: 14px;
      font-size: 16px;
      color: var(--muted);
      pointer-events: none;
    }
    .wb-search-input {
      width: 100%;
      padding: 12px 16px 12px 42px;
      border-radius: 10px;
      background: rgba(10, 9, 16, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #fff;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.92rem;
      outline: none;
      transition: all 0.2s;
    }
    .wb-search-input:focus {
      border-color: #38bdf8;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
      background: rgba(14, 12, 22, 0.9);
    }
    .wb-search-clear {
      position: absolute;
      right: 12px;
      background: transparent;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-size: 16px;
      display: none;
    }

    .wb-mod-select {
      min-width: 180px;
      padding: 12px 16px;
      border-radius: 10px;
      background: rgba(10, 9, 16, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #fff;
      font-family: 'Oswald', sans-serif;
      font-size: 0.9rem;
      outline: none;
      cursor: pointer;
      transition: all 0.2s;
    }
    .wb-mod-select:focus {
      border-color: #38bdf8;
    }

    /* Filter Pills */
    .wb-pills-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .wb-pill-label {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      color: var(--muted);
      text-transform: uppercase;
      margin-right: 4px;
    }
    .wb-filter-pill {
      padding: 5px 12px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: var(--muted);
      font-family: 'Oswald', sans-serif;
      font-size: 0.8rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }
    .wb-filter-pill:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #fff;
      border-color: rgba(255, 255, 255, 0.15);
    }
    .wb-filter-pill.active {
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 165, 233, 0.15));
      border-color: #38bdf8;
      color: #38bdf8;
      box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
    }

    /* Recipe Grid Cards */
    .wb-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 12px;
      min-height: 480px;
    }
    .wb-card {
      background: rgba(22, 19, 32, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 12px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }
    .wb-card:hover {
      background: rgba(33, 29, 48, 0.9);
      border-color: rgba(56, 189, 248, 0.45);
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(56, 189, 248, 0.15);
    }
    .wb-card.active {
      background: rgba(30, 38, 56, 0.9);
      border-color: #38bdf8;
      box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    }
    .wb-card-icon {
      width: 44px;
      height: 44px;
      background: #252233;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      position: relative;
      box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.6);
    }
    .wb-card-icon img {
      width: 34px;
      height: 34px;
      object-fit: contain;
      image-rendering: pixelated;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    }
    .wb-card-badge {
      position: absolute;
      bottom: 2px;
      right: 4px;
      font-family: 'Share Tech Mono', monospace;
      font-size: 11px;
      font-weight: 700;
      color: #fff;
      text-shadow: 1px 1px 0 #000;
    }
    .wb-card-body {
      flex: 1;
      min-width: 0;
    }
    .wb-card-name {
      font-family: 'Oswald', sans-serif;
      font-size: 0.92rem;
      font-weight: 600;
      color: #f1f5f9;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 2px;
    }
    .wb-card-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.7rem;
      color: var(--muted);
    }
    .wb-card-mod {
      color: #c084fc;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 90px;
    }
    .wb-card-station {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 4px;
      padding: 1px 5px;
      font-size: 0.68rem;
    }

    /* Empty state */
    .wb-empty-state {
      grid-column: 1 / -1;
      text-align: center;
      padding: 60px 20px;
      background: rgba(18, 16, 26, 0.6);
      border: 1px dashed rgba(255, 255, 255, 0.1);
      border-radius: 16px;
      color: var(--muted);
    }
    .wb-empty-state h4 {
      font-family: 'Oswald', sans-serif;
      font-size: 1.3rem;
      color: #fff;
      margin-bottom: 6px;
    }

    /* Pagination controls */
    .wb-pagination {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      padding: 16px 20px;
      background: rgba(18, 16, 26, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
    }
    .wb-page-info {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.82rem;
      color: var(--muted);
    }
    .wb-page-btns {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .wb-page-btn {
      padding: 6px 12px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: var(--muted);
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.15s;
    }
    .wb-page-btn:hover:not(:disabled) {
      background: rgba(56, 189, 248, 0.15);
      border-color: rgba(56, 189, 248, 0.4);
      color: #fff;
    }
    .wb-page-btn.active {
      background: #38bdf8;
      border-color: #38bdf8;
      color: #0b1120;
      font-weight: 700;
    }
    .wb-page-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }

    /* ==========================================================================
       6. 3D MULTIBLOCKS & IN-WORLD STRUCTURES VIEWER
       ========================================================================== */
    .cluster-multiblocks .vtab-btn {
      border-color: rgba(168, 85, 247, 0.4);
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(56, 189, 248, 0.08));
    }
    .cluster-multiblocks .vtab-btn:hover,
    .cluster-multiblocks .vtab-btn.active {
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(56, 189, 248, 0.25));
      border-color: #c084fc;
      box-shadow: 0 0 16px rgba(192, 132, 252, 0.35);
    }

    .mb-hero-panel {
      background: linear-gradient(135deg, rgba(28, 20, 48, 0.95), rgba(12, 16, 32, 0.9));
      border: 1px solid rgba(192, 132, 252, 0.25);
      border-radius: 20px;
      padding: 24px 30px;
      margin-bottom: 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 20px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      position: relative;
      overflow: hidden;
    }
    .mb-hero-panel::after {
      content: '';
      position: absolute;
      top: -50px;
      right: 20%;
      width: 250px;
      height: 150px;
      background: radial-gradient(circle, rgba(168, 85, 247, 0.2), transparent 70%);
      pointer-events: none;
    }
    .mb-hero-title-wrap {
      display: flex;
      align-items: center;
      gap: 18px;
    }
    .mb-hero-icon {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(56, 189, 248, 0.25));
      border: 1px solid rgba(192, 132, 252, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
    }
    .mb-hero-text h2 {
      margin: 0 0 6px;
      font-size: 1.45rem;
      font-weight: 800;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .mb-hero-text p {
      margin: 0;
      color: var(--muted);
      font-size: 0.88rem;
      max-width: 650px;
      line-height: 1.5;
    }
    .mb-hero-stats {
      display: flex;
      align-items: center;
      gap: 18px;
      background: rgba(10, 9, 18, 0.6);
      padding: 12px 20px;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* Dual-pane layout */
    .mb-main-layout {
      display: grid;
      grid-template-columns: minmax(420px, 1.2fr) minmax(360px, 1fr);
      gap: 24px;
      align-items: start;
    }
    @media (max-width: 1100px) {
      .mb-main-layout {
        grid-template-columns: 1fr;
      }
    }

    /* Left pane: 3D Structure card */
    .mb-viewer-card {
      background: rgba(18, 15, 28, 0.9);
      border: 1px solid rgba(192, 132, 252, 0.2);
      border-radius: 20px;
      padding: 22px;
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
      position: sticky;
      top: 20px;
    }
    .mb-viewer-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 16px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .mb-selected-name {
      font-size: 1.25rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 4px;
    }
    .mb-selected-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .mb-badge-mod {
      background: rgba(168, 85, 247, 0.2);
      color: #c084fc;
      border: 1px solid rgba(168, 85, 247, 0.35);
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 6px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .mb-badge-dim {
      background: rgba(56, 189, 248, 0.15);
      color: #38bdf8;
      border: 1px solid rgba(56, 189, 248, 0.3);
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.75rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 6px;
    }

    /* 3D Viewport canvas container */
    .mb-canvas-wrap {
      position: relative;
      width: 100%;
      height: 380px;
      background: radial-gradient(circle at 50% 50%, #211c33 0%, #0d0a17 100%);
      border-radius: 14px;
      border: 1px solid rgba(192, 132, 252, 0.25);
      overflow: hidden;
      box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.85);
      cursor: grab;
      user-select: none;
    }
    .mb-canvas-wrap:active {
      cursor: grabbing;
    }
    .mb-canvas-wrap canvas {
      width: 100% !important;
      height: 100% !important;
      display: block;
    }

    /* 3D Overlay Toolbar (top) */
    .mb-3d-toolbar {
      position: absolute;
      top: 12px;
      left: 12px;
      right: 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      pointer-events: none;
      z-index: 10;
    }
    .mb-3d-tools-left,
    .mb-3d-tools-right {
      display: flex;
      align-items: center;
      gap: 8px;
      pointer-events: auto;
    }
    .mb-tool-btn {
      background: rgba(15, 12, 24, 0.85);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: var(--muted);
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s ease;
    }
    .mb-tool-btn:hover {
      background: rgba(168, 85, 247, 0.25);
      border-color: #c084fc;
      color: #fff;
      box-shadow: 0 0 12px rgba(192, 132, 252, 0.4);
    }
    .mb-tool-btn.active {
      background: linear-gradient(135deg, #a855f7, #38bdf8);
      border-color: #fff;
      color: #fff;
      box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
    }

    /* Layer Slider Bar (bottom of 3D canvas) */
    .mb-layer-bar {
      position: absolute;
      bottom: 12px;
      left: 12px;
      right: 12px;
      background: rgba(15, 12, 24, 0.9);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(192, 132, 252, 0.3);
      border-radius: 12px;
      padding: 8px 16px;
      display: flex;
      align-items: center;
      gap: 14px;
      z-index: 10;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
    }
    .mb-layer-label {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.82rem;
      font-weight: 700;
      color: #38bdf8;
      white-space: nowrap;
      min-width: 110px;
    }
    .mb-layer-slider {
      flex: 1;
      accent-color: #a855f7;
      cursor: pointer;
      height: 6px;
      border-radius: 3px;
    }
    .mb-layer-nav-btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #fff;
      width: 28px;
      height: 28px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      cursor: pointer;
      transition: all 0.15s;
    }
    .mb-layer-nav-btn:hover {
      background: #a855f7;
      border-color: #a855f7;
    }

    /* Raycasting Block Tooltip */
    .mb-block-tooltip {
      position: absolute;
      bottom: 60px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(10, 8, 16, 0.95);
      border: 1px solid #38bdf8;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
      border-radius: 10px;
      padding: 6px 14px;
      display: none;
      align-items: center;
      gap: 10px;
      z-index: 20;
      pointer-events: none;
      white-space: nowrap;
    }
    .mb-tt-icon {
      width: 24px;
      height: 24px;
      object-fit: contain;
      image-rendering: pixelated;
    }
    .mb-tt-name {
      font-size: 0.85rem;
      font-weight: 700;
      color: #fff;
    }
    .mb-tt-coords {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.15);
      padding: 2px 6px;
      border-radius: 4px;
    }

    /* Materials Checklist */
    .mb-section-title {
      font-size: 0.85rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--muted);
      margin: 18px 0 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .mb-materials-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .mb-mat-pill {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      padding: 6px 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      color: #e2e8f0;
      transition: all 0.15s;
    }
    .mb-mat-pill:hover {
      background: rgba(56, 189, 248, 0.1);
      border-color: rgba(56, 189, 248, 0.3);
    }
    .mb-mat-pill img {
      width: 22px;
      height: 22px;
      object-fit: contain;
      image-rendering: pixelated;
    }
    .mb-mat-count {
      font-family: 'Share Tech Mono', monospace;
      font-weight: 700;
      color: #fbbf24;
      background: rgba(251, 191, 36, 0.15);
      padding: 1px 6px;
      border-radius: 6px;
      font-size: 0.78rem;
    }

    /* Guide Box */
    .mb-guide-box {
      background: rgba(10, 8, 16, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 12px;
      padding: 14px 16px;
      font-size: 0.85rem;
      color: #cbd5e1;
      line-height: 1.6;
      white-space: pre-line;
    }
    .mb-actions {
      display: flex;
      gap: 10px;
      margin-top: 14px;
    }
    .mb-action-btn {
      flex: 1;
      background: rgba(56, 189, 248, 0.12);
      border: 1px solid rgba(56, 189, 248, 0.3);
      color: #38bdf8;
      border-radius: 10px;
      padding: 8px 14px;
      font-weight: 700;
      font-size: 0.82rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.15s;
    }
    .mb-action-btn:hover {
      background: #38bdf8;
      color: #0b1120;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
    }

    /* Right pane: Catalog & Filters */
    .mb-catalog-pane {
      background: rgba(18, 15, 28, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 20px;
      padding: 22px;
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    }
    .mb-filter-bar {
      display: flex;
      gap: 12px;
      margin-bottom: 14px;
    }
    .mb-search-input-wrap {
      position: relative;
      flex: 1;
    }
    .mb-search-input {
      width: 100%;
      background: rgba(10, 8, 16, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 12px;
      padding: 10px 14px 10px 38px;
      font-size: 0.88rem;
      color: #fff;
      outline: none;
      transition: all 0.15s;
    }
    .mb-search-input:focus {
      border-color: #a855f7;
      box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
    }
    .mb-search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 16px;
      color: var(--muted);
      pointer-events: none;
    }
    .mb-mod-select {
      background: rgba(10, 8, 16, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 12px;
      padding: 0 14px;
      color: #cbd5e1;
      font-size: 0.85rem;
      outline: none;
      cursor: pointer;
    }

    /* Category pills */
    .mb-category-pills {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 18px;
    }
    .mb-cat-pill {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 20px;
      padding: 5px 14px;
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--muted);
      cursor: pointer;
      transition: all 0.15s;
    }
    .mb-cat-pill:hover {
      border-color: rgba(168, 85, 247, 0.35);
      color: #fff;
    }
    .mb-cat-pill.active {
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(56, 189, 248, 0.25));
      border-color: #c084fc;
      color: #fff;
      box-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
    }

    /* Cards Grid */
    .mb-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 12px;
      max-height: 680px;
      overflow-y: auto;
      padding-right: 4px;
    }
    .mb-card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all 0.15s ease;
      position: relative;
    }
    .mb-card:hover {
      background: rgba(168, 85, 247, 0.12);
      border-color: rgba(192, 132, 252, 0.4);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
    .mb-card.active {
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(56, 189, 248, 0.15));
      border-color: #c084fc;
      box-shadow: 0 0 18px rgba(192, 132, 252, 0.3);
    }
    .mb-card-icon {
      width: 44px;
      height: 44px;
      border-radius: 10px;
      background: rgba(10, 8, 16, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .mb-card-icon img {
      width: 32px;
      height: 32px;
      object-fit: contain;
      image-rendering: pixelated;
    }
    .mb-card-info {
      flex: 1;
      min-width: 0;
    }
    .mb-card-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .mb-card-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.72rem;
    }
    .mb-card-mod {
      color: #c084fc;
      font-weight: 700;
    }
    .mb-card-count {
      font-family: 'Share Tech Mono', monospace;
      color: var(--muted);
    }


  