/* Variables & Reset */
:root { --bg: #0b1628; --bg-deep: #07101e; --panel: #12243b; --panel-2: #18304d; --panel-dark: #0d1c30; --line: #284765; --line-soft: #203b57; --line-hover: #3d6385; --text: #e8edf2; --muted: #b7c2ce; --muted-dark: #8492a1; --accent: #78a9d6; --accent-2: #8fc4cf; --block-green: #8fc6a3; --block-green-bg: rgba(143, 198, 163, 0.10); --block-green-hover: rgba(143, 198, 163, 0.16); --good: #8fc6a3; --warning: #d6b56a; --accent-bg: rgba(120, 169, 214, 0.10); --accent-bg-strong: rgba(120, 169, 214, 0.16); --cyan-bg: rgba(143, 196, 207, 0.10); --green-bg: rgba(143, 198, 163, 0.09); --warning-bg: rgba(214, 181, 106, 0.12); --max: 1180px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding-top: 68px; background: radial-gradient(circle at 80% 0%, rgba(51, 136, 255, 0.15), transparent 34rem), radial-gradient(circle at 15% 25%, rgba(0, 255, 85, 0.08), transparent 28rem), var(--bg); color: var(--text); font: 15px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Typography & Fonts */
@font-face { font-family: "Monocraft"; src: url("fonts/Monocraft.ttf") format("truetype"); font-weight: normal; font-style: normal; font-display: swap; }
h1 { font-size: clamp(42px, 7vw, 78px); line-height: 0.98; letter-spacing: -0.055em; margin: 0 0 24px; }
h1 span { color: var(--accent); }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 18px; max-width: 720px; }

/* Navigation & Topbar */
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(0, 18, 51, 0.88); backdrop-filter: blur(14px); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
.brand { font-weight: 800; letter-spacing: -0.02em; margin-left: 40px; white-space: nowrap; flex: 0 0 auto; }
.brand span { color: var(--accent); font-size: 11px; letter-spacing: 0.18em; margin-left: 8px; }
.topbar nav { display: flex; gap: 20px; color: var(--muted); margin-left: auto; flex: 0 0 auto; }
.topbar nav a { transition: color 0.2s ease, opacity 0.2s ease; white-space: nowrap; }
.topbar nav a:hover, .topbar nav .active { color: var(--text); }
nav a.active { display: inline-flex; align-items: center; gap: 8px; }
nav a.active img { width: 24px; height: 24px; object-fit: contain; }

/* Layout & Mod Cards */
.hero-wrap { max-width: var(--max); margin: auto; padding: 90px 28px 70px; }
.hero { max-width: 820px; }
.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 52px; }
.mod-card { min-height: 250px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(0, 34, 85, 0.92), rgba(0, 22, 59, 0.94)); display: block; position: relative; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.mod-card.featured:hover { transform: translateY(-4px); border-color: rgba(51, 136, 255, 0.65); background: linear-gradient(145deg, rgba(0, 48, 119, 0.96), rgba(0, 22, 59, 0.96)); }
.mod-card.placeholder { opacity: 0.65; }
.card-top { display: flex; align-items: center; gap: 16px; padding-right: 35px; }
.card-icon { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-bg); font-size: 22px; flex: 0 0 auto; overflow: hidden; }
.card-icon img { width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.card-title { min-width: 0; }
.card-title .tag { margin: 0 0 2px; }
.card-title h2 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -0.025em; }
.card-body { padding-right: 35px; margin-top: 18px; }
.card-body p { color: var(--muted); margin: 0 0 18px; }
.tag, .version-label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta span { font-size: 11px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(0, 34, 85, 0.35); }
.arrow { position: absolute; right: 24px; bottom: 22px; color: var(--accent); font-size: 22px; transition: transform 0.2s ease; }
.mod-card.featured:hover .arrow { transform: translateX(4px); }

/* Footer */
footer { max-width: var(--max); margin: auto; padding: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer a { color: var(--accent); }
footer a:hover { color: var(--accent-2); }

/* Documentation & Sidebar */
.docs-layout { max-width: 1280px; margin: auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 46px; padding: 36px 28px 80px; }
.sidebar { position: sticky; top: 104px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.sidebar-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.025em; }
.side-heading { margin: 24px 10px 6px; color: var(--muted-dark); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; }
.side-link { padding: 7px 10px; border-radius: 7px; color: var(--muted); transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.side-link:hover { background: var(--accent-bg); color: var(--text); }
.side-link.active { background: var(--accent-bg-strong); color: var(--text); box-shadow: inset 2px 0 var(--accent); }
.docs-main { min-width: 0; }
.breadcrumbs { color: var(--muted); font-size: 12px; margin-bottom: 40px; }
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { color: var(--accent-2); }
.doc-hero { display: flex; justify-content: space-between; gap: 40px; align-items: flex-end; }
.doc-hero h1 { font-size: clamp(42px, 6vw, 68px); }
.version-card { min-width: 205px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(0, 34, 85, 0.9), rgba(0, 22, 59, 0.9)); }
.version-card strong { display: block; font-size: 22px; margin: 5px 0; }
.version-card span { color: var(--muted); font-size: 12px; }
.docs-main h2 { margin: 42px 0 18px; font-size: 26px; letter-spacing: -0.025em; }
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.doc-grid a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, rgba(0, 34, 85, 0.72), rgba(0, 22, 59, 0.72)); transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease; }
.doc-grid a:hover { border-color: var(--line-hover); background: linear-gradient(145deg, rgba(0, 48, 119, 0.82), rgba(0, 28, 74, 0.82)); transform: translateY(-1px); }
.doc-grid b { display: block; margin-bottom: 4px; }
.doc-grid span { color: var(--muted); font-size: 13px; }
.doc-page h1 { font-size: 52px; }
.doc-page .content { max-width: 820px; }
.content p { color: var(--muted); }

/* Mobile Sidebar Toggle */
.sidebar-toggle { display: none; }

/* Sprite Decorations */
.topbar::before { content: ""; position: absolute; left: 28px; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); background: url("branding/mh837-logo.png") center / contain no-repeat; pointer-events: none; }
.topbar .brand { margin-left: 40px; }
.side-link.active { display: flex; align-items: center; gap: 8px; }
.side-link.active::before { content: ""; flex: 0 0 22px; width: 22px; height: 22px; background: url("branding/skin_sprite/right_one-up.png") center / contain no-repeat; pointer-events: none; }
.notice { position: relative; margin: 42px 0; padding: 15px 82px 15px 18px; border: 1px solid var(--warning); border-radius: 10px; background: var(--warning-bg); color: var(--text); overflow: hidden; }
.notice strong { color: var(--warning); }
.notice::after { content: ""; position: absolute; right: 12px; bottom: 8px; width: 48px; height: 48px; background: url("branding/skin_sprite/left_standing.png") right bottom / contain no-repeat; pointer-events: none; }

/* Buttons & Notices */
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.button { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(0, 34, 85, 0.35); transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.button:hover { color: var(--text); border-color: var(--line-hover); background: var(--panel-2); transform: translateY(-1px); }
.button.primary { background: rgba(0, 255, 85, 0.25); border-color: rgba(0, 255, 85, 0.25); color: var(--muted); font-weight: 800; }
.button.primary:hover { background: rgba(0, 255, 85, 0.32); border-color: var(--block-green); color: var(--text); }

/* Lists, Code & Tables */
.feature-list { padding-left: 20px; color: var(--text); }
.feature-list li, .content li { margin: 8px 0; padding: 8px 14px; background: var(--block-green-bg); border-left: 4px solid var(--block-green); border-radius: 0 6px 6px 0; color: var(--text); }
.content code { padding: 2px 5px; background: var(--block-green-bg); border: 1px solid var(--block-green); border-radius: 4px; color: var(--block-green); }
.content .placeholder-box { position: relative; overflow: hidden; padding: 22px; border: 2px dashed var(--block-green); border-radius: 12px; color: var(--text); background: var(--block-green-bg); }
.content .placeholder-box video { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.content a { color: var(--block-green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(143, 198, 163, 0.65); transition: color 0.2s ease, text-decoration-color 0.2s ease; }
.content a:hover { color: #b2e0bf; text-decoration-color: #b2e0bf; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th, td { padding: 10px 12px; border: 1px solid var(--block-green); text-align: left; }
th { background: rgba(0, 255, 85, 0.25); color: var(--text); font-weight: bold; }
td { color: var(--text); background: var(--block-green-bg); }
tr:hover td { background: var(--block-green-hover); }

/* Item Showcase & Recipes */
.item-showcase { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; margin: 25px 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-bg); }
.item-showcase-image { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; gap: 4px; }
.item-showcase-image img { width: 128px; height: 128px; object-fit: contain; image-rendering: pixelated; }
.item-showcase-image::after { content: attr(data-item-name); display: block; margin-top: 12px; font-family: "Monocraft", monospace; font-size: 18px; font-weight: normal; line-height: 1.2; color: var(--text); white-space: nowrap; }
.item-showcase-image[data-item-name="Phanes Blade"]::after { color: #ffff55; }
.item-showcase-info { display: flex; flex-direction: column; gap: 16px; }
.item-showcase-section { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 34, 85, 0.35); }
.item-showcase-section strong { display: block; color: var(--accent); margin-bottom: 6px; }
.item-showcase-section:first-child { border-color: var(--warning); background: var(--warning-bg); }
.item-showcase-section:first-child strong { color: var(--warning); }
.recipe { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; }
.recipe span { font-family: "Monocraft", monospace; }
.recipe-title-separator { margin: 0 144px; color: var(--muted); }

/* Entity Showcase */
.entity-showcase { position: relative; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; margin: 30px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 18% 20%, rgba(120, 169, 214, 0.12), transparent 220px), linear-gradient(145deg, rgba(0, 34, 85, 0.96), rgba(7, 16, 30, 0.98)); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.entity-showcase::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--block-green)); }
.entity-showcase-image { min-height: 390px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); background: radial-gradient(circle at center, rgba(120, 169, 214, 0.13), transparent 65%), rgba(7, 16, 30, 0.42); }
.entity-showcase-image img { width: 220px; height: 220px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px rgba(120, 169, 214, 0.12)); }
.entity-showcase-name { width: 100%; margin-top: 18px; text-align: center; font-family: "Monocraft", monospace; font-size: 20px; font-weight: bold; letter-spacing: -0.02em; color: var(--text); }
.entity-showcase-type { margin-top: 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.entity-showcase-info { min-width: 0; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.entity-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.entity-header-title { min-width: 0; }
.entity-header-title h3 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -0.025em; }
.entity-header-title span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.entity-health { flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.22); white-space: nowrap; }
.entity-health-label { display: block; margin-bottom: 5px; color: var(--muted-dark); font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.entity-hearts { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.entity-heart { width: 18px; height: 18px; object-fit: contain; image-rendering: pixelated; }
.entity-health-number { margin-left: 6px; color: var(--text); font-family: "Monocraft", monospace; font-size: 12px; font-weight: bold; }
.entity-stats { display: flex; flex-wrap: wrap; gap: 7px; }
.entity-stat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 34, 85, 0.35); color: var(--muted); font-size: 11px; }
.entity-stat strong { color: var(--accent); font-size: 10px; letter-spacing: 0.05em; }
.entity-info-box { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 34, 85, 0.32); }
.entity-info-box strong { display: block; margin-bottom: 6px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.entity-info-box p { margin: 0; color: var(--muted); }
.entity-info-box.spawning { border-color: var(--block-green); background: var(--block-green-bg); }
.entity-info-box.spawning strong { color: var(--block-green); }
.entity-info-box.behaviour { border-color: var(--accent-2); background: var(--cyan-bg); }
.entity-info-box.behaviour strong { color: var(--accent-2); }
.entity-info-box.combat { border-color: var(--warning); background: var(--warning-bg); }
.entity-info-box.combat strong { color: var(--warning); }
.entity-bottom-row { display: flex; align-items: stretch; gap: 14px; }
.entity-drops { flex: 1; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 34, 85, 0.28); }
.entity-drops-title, .entity-spawn-title { margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.entity-drops-list { display: flex; flex-wrap: wrap; gap: 12px; }
.entity-drop { position: relative; width: 64px; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 16, 30, 0.65); transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.entity-drop:hover { transform: translateY(-3px); border-color: var(--line-hover); background: rgba(24, 48, 77, 0.8); }
.entity-drop img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.entity-drop-name { max-width: 58px; overflow: hidden; color: var(--muted); font-family: "Monocraft", monospace; font-size: 7px; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.entity-drop-amount { position: absolute; right: 3px; bottom: 3px; min-width: 15px; height: 15px; padding: 1px 3px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 3px; background: #10001f; color: #ffffff; font-family: "Monocraft", monospace; font-size: 8px; font-weight: bold; box-shadow: 2px 2px 0 #000000; }
.entity-spawn { flex: 0 0 auto; width: 110px; padding: 14px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 34, 85, 0.28); }
.entity-spawn-title { white-space: nowrap; }
.entity-spawn-box { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 16, 30, 0.65); transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.entity-spawn-box:hover { transform: translateY(-3px); border-color: var(--line-hover); background: rgba(24, 48, 77, 0.8); }
.entity-spawn-box img { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45)); }
.entity-label { display: inline-block; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

/* Weapons & Media */
.weapon-media-grid { display: grid !important; grid-template-columns: 220px minmax(0, 1fr) !important; align-items: stretch !important; gap: 18px !important; width: 100% !important; margin: 25px 0 !important; box-sizing: border-box !important; }
.weapon-media-grid > .weapon-display { width: 220px !important; min-width: 220px !important; height: 100% !important; min-height: 0 !important; aspect-ratio: auto !important; margin: 0 !important; padding: 16px 12px !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center !important; box-sizing: border-box !important; overflow: hidden !important; background: radial-gradient(circle at center, rgba(120, 169, 214, 0.10), transparent 65%), var(--panel-dark) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16) !important; }
.weapon-media-grid > .weapon-display .weapon-texture { width: 100% !important; min-width: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; }
.weapon-media-grid > .weapon-display .weapon-texture img { width: 156px !important; height: 156px !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain !important; image-rendering: pixelated !important; }
.weapon-media-grid > .weapon-display .weapon-name, .weapon-media-grid > .weapon-display .legendary-weapon-name, .weapon-media-grid > .weapon-display .primordial-weapon-name, .weapon-media-grid > .weapon-display .pixelated-name { display: block !important; width: 100% !important; margin: 12px 0 0 !important; font-family: "Monocraft", monospace !important; font-size: 16px !important; line-height: 1.25 !important; font-weight: normal !important; text-align: center !important; overflow-wrap: anywhere !important; }
.weapon-media-grid > .weapon-display .weapon-name { color: #55ffff !important; }
.weapon-media-grid > .weapon-display .legendary-weapon-name { color: #ff55ff !important; }
.weapon-media-grid > .weapon-display .primordial-weapon-name { color: #ffff55 !important; font-weight: bold !important; }
.weapon-media-grid > .weapon-ability { width: 100% !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 10px !important; display: flex !important; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; text-align: center !important; box-sizing: border-box !important; overflow: hidden !important; background: var(--block-green-bg) !important; border: 2px dashed var(--block-green) !important; border-radius: 12px !important; color: var(--text) !important; box-shadow: none !important; }
.weapon-media-grid > .weapon-ability > video, .weapon-media-grid > .weapon-ability > img { display: block !important; width: 100% !important; max-width: 100% !important; height: auto !important; aspect-ratio: 16 / 9 !important; object-fit: contain !important; box-sizing: border-box !important; border-radius: 7px !important; }
.weapon-media-grid > .weapon-ability > strong { display: block !important; margin-top: 10px !important; line-height: 1.3 !important; color: var(--text) !important; }
.weapon-media-grid > .weapon-ability > span { display: inline !important; line-height: 1.3 !important; color: var(--muted) !important; }
.weapon-media-grid > .weapon-ability > .placeholder-box { width: 100% !important; height: auto !important; min-height: 0 !important; aspect-ratio: 16 / 9 !important; margin: 0 !important; padding: 8px !important; display: flex !important; align-items: center !important; justify-content: center !important; box-sizing: border-box !important; overflow: hidden !important; background: var(--block-green-bg) !important; border: 2px dashed var(--block-green) !important; border-radius: 12px !important; }
.weapon-media-grid > .weapon-ability > .placeholder-box video, .weapon-media-grid > .weapon-ability > .placeholder-box img { width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; aspect-ratio: auto !important; object-fit: contain !important; }
.weapon-media-grid .primordial-abilities { min-width: 0 !important; width: 100% !important; }
.weapon-media-grid .primordial-ability { width: 100% !important; box-sizing: border-box !important; }
.weapon-media-grid .primordial-ability img, .weapon-media-grid .primordial-ability video { width: 100% !important; aspect-ratio: 16 / 9 !important; height: auto !important; object-fit: contain !important; }

/* Pack Logo */
.pack-logo { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }

/* Utilities & Scrollbar */
.text-accent { color: var(--accent); }
.text-cyan { color: var(--accent-2); }
.text-green { color: var(--good); }
.text-warning { color: var(--warning); }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.badge-blue { color: var(--accent); border-color: rgba(51, 136, 255, 0.3); background: var(--accent-bg); }
.badge-cyan { color: var(--accent-2); border-color: rgba(51, 204, 255, 0.3); background: var(--cyan-bg); }
.badge-green { color: var(--good); border-color: rgba(0, 255, 85, 0.3); background: var(--green-bg); }
::selection { background: rgba(51, 136, 255, 0.28); color: var(--text); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--line-hover); }

/* Responsive Media Queries */
@media (max-width: 800px) {
  body { padding-top: 60px; }
  .hero .eyebrow { font-size: 9px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 13px; }

  .topbar { padding: 0 14px; height: 60px; gap: 10px; }
  .topbar::before { left: 14px; width: 24px; height: 24px; }
  .topbar .brand { margin-left: 32px; font-size: 12px; line-height: 1; }
  .topbar nav { gap: 9px; margin-left: auto; }
  .topbar nav a { font-size: 10px; white-space: nowrap; }
  .topbar nav a:not(.active) { display: none; }
  nav a.active img { width: 19px; height: 19px; }
  .brand { min-width: 0; font-size: 13px; line-height: 1; white-space: nowrap; }
  .brand span { font-size: 7px; letter-spacing: 0.12em; margin-left: 3px; }

  .hero-wrap { padding: 65px 18px 55px; }
  .mod-grid, .doc-grid { grid-template-columns: 1fr; }

  .docs-layout { grid-template-columns: 1fr; padding: 22px 14px 60px; gap: 0; }

  /* Mobile documentation toggle */
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    cursor: pointer;
  }

  .sidebar-toggle::before {
    content: "☰";
    font-size: 12px;
  }

  .sidebar-toggle:hover,
  .sidebar-toggle:focus-visible {
    color: var(--text);
    outline: none;
  }

  .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    display: none;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 14px 14px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 22, 40, 0.97);
    backdrop-filter: blur(14px);
  }

  .sidebar.is-open { display: flex; }

  .side-heading { margin-top: 14px; }

  .doc-hero { flex-direction: column; align-items: flex-start; }
  .version-card { width: 100%; }

  .doc-page h1 { font-size: clamp(40px, 12vw, 52px); line-height: 1.02; }
  .docs-main, .content { min-width: 0; max-width: 100%; }
  .docs-main { overflow-x: hidden; }
  .docs-main h2 { font-size: 23px; line-height: 1.2; margin-top: 34px; }
  .content { overflow-wrap: break-word; }

  .notice { margin: 28px 0; padding: 13px 68px 13px 14px; font-size: 13px; line-height: 1.55; overflow: hidden; }
  .notice strong { line-height: 1.4; }
  .notice img { display: block; width: auto; max-width: 100%; height: auto; max-height: 180px; margin: 10px auto 4px; object-fit: contain; }
  .notice .pack-logo { width: 18px; height: 18px; max-width: none; max-height: none; margin: 0; }
  .notice picture, .notice figure { display: block; max-width: 100%; margin: 10px auto; }
  .notice figure img { margin: 0 auto; }
  .notice::after { right: 8px; bottom: 6px; width: 40px; height: 40px; }

  .item-showcase { grid-template-columns: 1fr; gap: 14px; margin: 20px 0; padding: 14px; }
  .item-showcase-image { min-height: 135px; padding: 8px 4px; }
  .item-showcase-image img { width: 104px; height: 104px; }
  .item-showcase-image::after { max-width: 100%; margin-top: 8px; font-size: 14px; line-height: 1.25; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .item-showcase-info { gap: 10px; }
  .item-showcase-section { padding: 11px 12px; font-size: 13px; line-height: 1.5; }
  .item-showcase-section strong { margin-bottom: 5px; }

  .recipe { width: min(372px, 100%); height: 186px; margin-left: auto; margin-right: auto; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .recipe span { max-width: 100%; font-size: 12px; line-height: 1.35; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .recipe-title-separator { width: 100%; margin: 6px 0; text-align: center; color: var(--muted); }
  .recipe img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

  .content table, .docs-main table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; white-space: nowrap; margin: 16px 0; }
  .content table thead, .content table tbody, .docs-main table thead, .docs-main table tbody { width: max-content; }
  .content th, .content td, .docs-main th, .docs-main td { padding: 8px 10px; font-size: 12px; line-height: 1.4; vertical-align: middle; max-width: 280px; }
  .content th, .docs-main th { font-size: 11px; }

  .entity-showcase { grid-template-columns: 1fr; margin: 22px 0; }
  .entity-showcase-image { min-height: 245px; padding: 18px; border-right: none; border-bottom: 1px solid var(--line); }
  .entity-showcase-image img { width: 145px; height: 145px; }
  .entity-showcase-name { margin-top: 12px; font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
  .entity-showcase-info { padding: 14px; gap: 11px; }
  .entity-header { gap: 12px; }
  .entity-header-title h3 { font-size: 21px; line-height: 1.15; }
  .entity-header-title span { font-size: 11px; }
  .entity-bottom-row { gap: 10px; }
  .entity-drops { padding: 11px; }
  .entity-drops-list { gap: 8px; }
  .entity-drop { width: 58px; min-height: 70px; padding: 5px; }
  .entity-drop img { width: 36px; height: 36px; }
  .entity-drop-name { max-width: 52px; font-size: 6.5px; }
  .entity-spawn { width: 88px; padding: 10px; }
  .entity-spawn-box { width: 66px; height: 66px; }
  .entity-spawn-box img { width: 50px; height: 50px; }
  .entity-info-box { padding: 11px 12px; font-size: 13px; line-height: 1.5; }
  .entity-info-box strong { margin-bottom: 5px; }

  /* Sprite decorations — mobile */
  .side-link.active::before { flex-basis: 19px; width: 19px; height: 19px; }

  /* Weapon media — mobile */
  .weapon-media-grid { grid-template-columns: 1fr !important; align-items: start !important; gap: 12px !important; margin: 22px 0 !important; }
  .weapon-media-grid > .weapon-display { width: 100% !important; min-width: 0 !important; height: 190px !important; min-height: 190px !important; aspect-ratio: auto !important; padding: 12px 10px !important; }
  .weapon-media-grid > .weapon-display .weapon-texture img { width: 125px !important; height: 125px !important; }
  .weapon-media-grid > .weapon-display .weapon-name, .weapon-media-grid > .weapon-display .legendary-weapon-name, .weapon-media-grid > .weapon-display .primordial-weapon-name, .weapon-media-grid > .weapon-display .pixelated-name { font-size: 14px !important; margin-top: 8px !important; }
  .weapon-media-grid > .weapon-ability { width: 100% !important; min-width: 0 !important; padding: 7px !important; }
  .weapon-media-grid > .weapon-ability > video, .weapon-media-grid > .weapon-ability > img { aspect-ratio: 16 / 9 !important; }
  .weapon-media-grid > .weapon-ability > strong { margin-top: 8px !important; font-size: 13px !important; }

  .primordial-weapon, .legendary-weapon { grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  .primordial-weapon-display, .legendary-weapon .weapon-display { width: 100% !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; aspect-ratio: 16 / 9 !important; padding: 8px !important; }
  .primordial-weapon-icon { width: 95px !important; height: 95px !important; }
  .primordial-weapon-icon img { width: 88px !important; height: 88px !important; }
  .legendary-weapon .weapon-texture img { width: 84px !important; height: 84px !important; }
  .primordial-weapon-name, .legendary-weapon-name { font-size: 10px !important; line-height: 1.2 !important; }
  .primordial-ability, .legendary-weapon .weapon-ability { padding: 5px !important; }
  .primordial-ability .placeholder-box, .legendary-weapon .weapon-ability .placeholder-box { padding: 4px !important; aspect-ratio: 16 / 9 !important; }
  .primordial-ability-name, .ability-name { font-size: 10px; }
  .primordial-ability-description, .ability-description { font-size: 9px; }

  .primordial-weapon-name { margin-top: 10px; font-size: 16px; }
  .primordial-weapon-subtitle { font-size: 11px; }

  .button-row { gap: 8px; margin-top: 16px; }
  .button { padding: 8px 11px; font-size: 12px; line-height: 1.3; }
  .feature-list { padding-left: 8px; }
  .feature-list li, .content li { margin: 6px 0; padding: 7px 10px; font-size: 13px; line-height: 1.5; }
  .badge { font-size: 10px; padding: 2px 7px; }
  footer { padding: 24px 18px; }
}

@media (max-width: 700px) {
  .hero .eyebrow { font-size: 9px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 13px; }
  .card-title .gile-title { font-size: clamp(1.45rem, 8vw, 2.2rem); }
  .mod-card, .mod-card.featured { width: 100%; max-width: 100%; box-sizing: border-box; }
  .card-top { min-width: 0; max-width: 100%; padding-right: 0; }
  .card-body { min-width: 0; max-width: 100%; }
  .card-title { min-width: 0; max-width: 100%; flex: 1 1 auto; }
  .card-title .gile-title { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 600px) {
  .hero .eyebrow { font-size: 9px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 13px; }
  .weapon-media-grid { grid-template-columns: 1fr !important; }
  .weapon-media-grid .placeholder-box { height: auto; min-height: 0; aspect-ratio: 16 / 9; padding: 6px; }
  .weapon-media-grid .placeholder-box video { width: 100%; height: 100%; object-fit: contain; }
}

@media (max-width: 480px) {
  .hero .eyebrow { font-size: 9px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 13px; }
  .topbar { padding: 0 14px; height: 60px; gap: 10px; }
  .topbar::before { left: 14px; width: 24px; height: 24px; }
  .topbar .brand { margin-left: 32px; font-size: 12px; line-height: 1; }
  .brand span { font-size: 7px; letter-spacing: 0.12em; margin-left: 3px; }
  .topbar nav { gap: 9px; margin-left: auto; }
  .topbar nav a { font-size: 10px; white-space: nowrap; }
  .topbar nav a:not(.active) { display: none; }
  nav a.active img { width: 18px; height: 18px; }
  .brand { font-size: 12px; }

  .card-title .gile-title { font-size: clamp(1.35rem, 7vw, 2rem); }
  .mod-card { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
  h1 { font-size: 44px; }
  .lead { font-size: 16px; }
  .mod-card { padding: 22px; min-height: 220px; }
  .card-icon { width: 50px; height: 50px; }
  .card-title h2 { font-size: 24px; }
  .card-body { padding-right: 25px; }
  .doc-grid a { padding: 16px; }
  .docs-layout { padding-left: 11px; padding-right: 11px; }
  .docs-main h2 { font-size: 21px; }

  .notice { margin: 22px 0; padding: 11px 58px 11px 12px; font-size: 12px; }
  .notice img { max-height: 145px; }
  .notice .pack-logo { width: 18px; height: 18px; max-width: none; max-height: none; margin: 0; }
  .notice::after { right: 6px; bottom: 5px; width: 34px; height: 34px; }

  .recipe { width: 100%; max-width: 372px; height: 186px; }
  .recipe span { font-size: 11px; }
  .recipe-title-separator { margin: 5px 0; }

  .item-showcase { padding: 11px; }
  .item-showcase-image { min-height: 120px; }
  .item-showcase-image img { width: 88px; height: 88px; }
  .item-showcase-image::after { font-size: 12px; }
  .item-showcase-section { padding: 9px 10px; font-size: 12px; }

  .content th, .content td, .docs-main th, .docs-main td { padding: 7px 8px; font-size: 11px; }
  .content th, .docs-main th { font-size: 10px; }

  .entity-showcase-image { min-height: 270px; padding: 20px; }
  .entity-showcase-image img { width: 160px; height: 160px; }
  .entity-header { flex-direction: column; }
  .entity-health { width: 100%; }
  .entity-showcase-info { padding: 16px; }
  .entity-header-title h3 { font-size: 24px; }
  .entity-bottom-row { gap: 7px; }
  .entity-drops { padding: 9px; }
  .entity-drops-list { gap: 6px; }
  .entity-drop { width: 54px; min-height: 66px; }
  .entity-drop img { width: 34px; height: 34px; }
  .entity-spawn { width: 82px; padding: 8px; }
  .side-link.active::before { flex-basis: 17px; width: 17px; height: 17px; }

  /* Weapon media — compact phone */
  .weapon-media-grid { gap: 10px !important; }
  .weapon-media-grid > .weapon-display { height: 160px !important; min-height: 160px !important; padding: 8px 7px !important; }
  .weapon-media-grid > .weapon-display .weapon-texture img { width: 105px !important; height: 105px !important; }
  .weapon-media-grid > .weapon-display .weapon-name, .weapon-media-grid > .weapon-display .legendary-weapon-name, .weapon-media-grid > .weapon-display .primordial-weapon-name, .weapon-media-grid > .weapon-display .pixelated-name { font-size: 11px !important; line-height: 1.2 !important; margin-top: 6px !important; }
  .weapon-media-grid > .weapon-ability { padding: 5px !important; }
  .weapon-media-grid > .weapon-ability > strong, .weapon-media-grid > .weapon-ability > span { font-size: 10px !important; line-height: 1.25 !important; }
}
