:root {
  --bg: #0b0b10;
  --bg-2: #111118;
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.09);
  --border-2: rgba(255,255,255,.16);
  --text: #f4f3fa;
  --text-dim: rgba(244,243,250,.66);
  --text-muted: rgba(244,243,250,.44);
  --accent: #9d8cf2;
  --accent-light: #c8beff;
  --accent-deep: #6d5ad8;
  --on: #6ee7a8;
  --off: #ff8a7a;
  --radius: 18px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(157,140,242,.4); }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; color: var(--accent-light); }
kbd { font-family: var(--mono); font-size: .78em; padding: .15em .5em; border-radius: 6px; border: 1px solid var(--border-2); border-bottom-width: 2px; background: var(--surface); color: var(--text); white-space: nowrap; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 100; background: linear-gradient(90deg, var(--accent-deep), var(--accent-light)); box-shadow: 0 0 12px var(--accent); }

.glass { background: rgba(20,20,28,.55); border: 1px solid var(--border); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }

/* NAV */
.nav-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 16px; }
.nav { display: flex; align-items: center; gap: 28px; padding: 8px 8px 8px 20px; border-radius: 999px; max-width: 980px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; }
.brand .dim { color: var(--text-muted); font-weight: 500; margin-left: -5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--text-dim); padding: 6px 12px; border-radius: 999px; transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.burger { display: none; width: 38px; height: 38px; border-radius: 50%; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 16px; height: 1.5px; background: var(--text); transition: .25s; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-radius: 999px; transition: transform .2s, box-shadow .25s, background .2s; white-space: nowrap; }
.btn-sm { font-size: 14px; padding: 8px 18px; }
.btn-lg { font-size: 15px; padding: 14px 26px; }
.btn-accent { background: linear-gradient(180deg, #ab9cf6, #8a77ec); color: #0d0b18; box-shadow: 0 6px 24px rgba(157,140,242,.35), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(157,140,242,.5), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { border: 1px solid var(--border-2); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }

/* HERO */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 140px 16px 80px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; font-size: 13px; color: var(--text-dim); margin-bottom: 28px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--on); box-shadow: 0 0 0 0 rgba(110,231,168,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(110,231,168,0); } 100% { box-shadow: 0 0 0 0 rgba(110,231,168,0); } }
h1 { font-size: clamp(42px, 8vw, 96px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
.grad { background: linear-gradient(100deg, var(--accent-light) 10%, var(--accent) 50%, #e2b8ff 90%); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.lead { max-width: 640px; margin: 26px auto 0; font-size: clamp(16px, 2vw, 19px); color: var(--text-dim); }
.btn-soon { cursor: default; opacity: .85; }
.btn-soon:hover { transform: none; box-shadow: 0 6px 24px rgba(157,140,242,.35), inset 0 1px 0 rgba(255,255,255,.4); }
.link { color: var(--accent-light, #b9adf8); text-decoration: underline; text-underline-offset: 3px; }
.soon-note { margin-top: 18px; color: var(--muted, #8b8a99); font-size: 14px; }
.cta { display: flex; gap: 12px; margin-top: 38px; flex-wrap: wrap; justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 70px; width: 100%; max-width: 640px; }
.stat { padding: 16px 8px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.stat b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.stat span { font-size: 13px; color: var(--text-muted); }

/* SECTIONS */
.section { max-width: 1180px; margin: 0 auto; padding: 110px 16px; }
.section.narrow { max-width: 780px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 14px; }
h2 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; font-weight: 750; }
.section-head p { margin-top: 18px; color: var(--text-dim); font-size: 17px; }
.note { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 18px; }
.small { font-size: 13px; color: var(--text-muted); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ===== VIEWPORT / GAME MOCK ===== */
.viewport { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 22px; overflow: hidden; border: 1px solid var(--border-2); box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(157,140,242,.08), 0 0 80px rgba(157,140,242,.1); outline: none; user-select: none; font-family: 'Inter', sans-serif; }
.viewport:focus-visible { box-shadow: 0 0 0 2px var(--accent), 0 40px 120px rgba(0,0,0,.6); }
#world { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%); opacity: .8; }
.crosshair::before, .crosshair::after { content: ''; position: absolute; background: #fff; mix-blend-mode: difference; }
.crosshair::before { left: 6px; top: 0; width: 2px; height: 14px; }
.crosshair::after { top: 6px; left: 0; height: 2px; width: 14px; }

.hud-watermark { position: absolute; top: 3.2%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px; background: rgba(14,14,20,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); font-size: clamp(10px, 1.3vw, 15px); font-weight: 600; transition: opacity .3s, transform .3s; white-space: nowrap; }
.hud-watermark.hidden { opacity: 0; transform: translate(-50%, -10px); }
.wm-dot { width: .55em; height: .55em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.wm-name { color: var(--accent-light); }
.wm-sep { width: 1px; height: 1.1em; background: rgba(255,255,255,.2); }
#wmTime { font-variant-numeric: tabular-nums; }

.hud-arraylist { position: absolute; top: 1.4%; right: 1%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; z-index: 2; }
.al-item { padding: 2px 10px; border-radius: 999px; background: rgba(14,14,20,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: clamp(8px, 1vw, 13px); font-weight: 600; white-space: nowrap; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.al-item i { font-style: normal; color: rgba(255,255,255,.5); font-weight: 500; margin-left: 5px; }
.al-item.enter { transform: translateX(120%); opacity: 0; }
.hud-arraylist.sz-0 .al-item { font-size: clamp(7px, .8vw, 11px); }
.hud-arraylist.sz-2 .al-item { font-size: clamp(9px, 1.2vw, 15px); }

.hud-notifs { position: absolute; display: flex; flex-direction: column; gap: 6px; z-index: 3; pointer-events: none; }
.hud-notifs.p0 { right: 1.2%; bottom: 3%; align-items: flex-end; flex-direction: column-reverse; }
.hud-notifs.p1 { left: 1.2%; bottom: 3%; align-items: flex-start; flex-direction: column-reverse; }
.hud-notifs.p2 { right: 1.2%; top: 30%; align-items: flex-end; }
.hud-notifs.p3 { left: 1.2%; top: 3%; align-items: flex-start; }
.notif { position: relative; overflow: hidden; padding: 5px 13px; border-radius: 999px; background: rgba(14,14,20,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08); font-size: clamp(9px, 1.05vw, 13px); font-weight: 600; white-space: nowrap; animation: nIn .35s cubic-bezier(.2,.8,.2,1); }
.notif b { font-weight: 600; margin-left: 4px; }
.notif b.on { color: var(--on); } .notif b.off { color: var(--off); }
.notif::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1.5px; border-radius: 2px; background: var(--accent); transform-origin: left; animation: nBar var(--dur, 2s) linear forwards; }
.notif.out { animation: nOut .3s forwards; }
@keyframes nIn { from { opacity: 0; transform: translateX(30px) scale(.95); } }
@keyframes nOut { to { opacity: 0; transform: translateX(30px) scale(.95); } }
@keyframes nBar { to { transform: scaleX(0); } }

/* ClickGUI */
.gui { position: absolute; left: 50%; top: 54%; width: min(78%, 820px); height: 70%; transform: translate(-50%, -50%); display: flex; border-radius: 14px; background: rgba(14,14,18,.5); border: 1px solid rgba(255,255,255,.13); backdrop-filter: blur(22px) saturate(130%); -webkit-backdrop-filter: blur(22px) saturate(130%); box-shadow: 0 20px 60px rgba(0,0,0,.45); transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1); z-index: 4; overflow: hidden; }
.gui::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 40%); pointer-events: none; }
.gui.hidden { opacity: 0; transform: translate(-50%, -46%) scale(.96); pointer-events: none; }
.gui-side { width: 150px; flex: none; padding: 14px 10px; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.07); }
.gui-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 2px 8px 14px; }
.gui-logo .dot { width: 8px; height: 8px; }
.gui-cats { display: flex; flex-direction: column; gap: 3px; position: relative; }
.gui-cat { text-align: left; padding: 7px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.62); display: flex; justify-content: space-between; align-items: center; transition: background .2s, color .2s; }
.gui-cat:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.86); }
.gui-cat.on { background: rgba(255,255,255,.12); color: #fff; }
.gui-cat small { font-size: 10px; color: rgba(255,255,255,.4); background: rgba(255,255,255,.06); border-radius: 999px; padding: 0 6px; }
.gui-cat.on small { background: rgba(157,140,242,.3); color: var(--accent-light); }
.gui-side-foot { margin-top: auto; display: flex; gap: 6px; }
.gui-mini { font-size: 11px; padding: 5px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.17); color: rgba(255,255,255,.75); cursor: pointer; transition: .2s; flex: 1; text-align: center; }
.gui-mini:hover { border-color: rgba(157,140,242,.7); color: #fff; background: rgba(157,140,242,.18); }
.gui-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gui-top { display: flex; gap: 8px; padding: 12px 14px 10px; }
.gui-top .gui-mini { flex: none; }
.gui-search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 6px; background: rgba(0,0,0,.17); border: 1px solid rgba(255,255,255,.11); color: rgba(255,255,255,.5); transition: border-color .2s; }
.gui-search:focus-within { border-color: rgba(157,140,242,.8); }
.gui-search input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 12px; padding: 6px 0; min-width: 0; }
.gui-grid { flex: 1; overflow-y: auto; padding: 2px 14px 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.gui-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.mcard { border-radius: 9px; background: rgba(0,0,0,.17); border: 1px solid rgba(255,255,255,.09); transition: background .25s, border-color .25s, box-shadow .3s; overflow: hidden; }
.mcard:hover { background: rgba(0,0,0,.25); }
.mcard.on { background: linear-gradient(180deg, rgba(230,224,255,.28), rgba(230,224,255,.2)); border-color: rgba(255,255,255,.25); box-shadow: 0 0 18px rgba(180,168,255,.25); }
.mhead { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 32px; cursor: pointer; }
.mname { flex: 1; font-size: 12.5px; font-weight: 600; color: rgba(240,240,244,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard.on .mname { color: #fff; }
.mdot { width: 6px; height: 6px; border-radius: 50%; background: rgba(20,20,24,.6); border: 1px solid rgba(255,255,255,.18); transition: .25s; flex: none; }
.mcard.on .mdot { background: #fff; box-shadow: 0 0 8px #e4deff; border-color: #fff; }
.mexp { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; color: rgba(255,255,255,.5); transition: transform .3s, color .2s; flex: none; }
.mexp:hover { color: var(--accent-light); }
.mcard.open .mexp { transform: rotate(90deg); color: var(--accent-light); }
.mbody { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2,.8,.2,1); }
.mcard.open .mbody { grid-template-rows: 1fr; }
.mbody > div { overflow: hidden; }
.msets { border-top: 1px solid rgba(255,255,255,.08); margin: 0 8px; padding: 6px 2px 8px; display: flex; flex-direction: column; gap: 2px; }

.set { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; font-size: 11.5px; color: rgba(255,255,255,.8); }
.set.col { flex-direction: column; align-items: stretch; gap: 3px; padding: 3px 0; }
.set .lbl { display: flex; justify-content: space-between; width: 100%; }
.set .val { color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; font-size: 10.5px; }
.switch { width: 24px; height: 13px; border-radius: 99px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.13); position: relative; transition: .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 1px; left: 1px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch.on { background: var(--accent); border-color: rgba(255,255,255,.3); }
.switch.on::after { transform: translateX(11px); }
.slider { position: relative; height: 12px; cursor: pointer; touch-action: none; }
.slider .tr { position: absolute; left: 0; right: 0; top: 4.5px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.15); }
.slider .fl { position: absolute; top: 4.5px; height: 3px; border-radius: 2px; background: var(--accent); }
.slider .kn { position: absolute; top: 1.5px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: transform .15s; }
.slider:hover .kn, .slider.drag .kn { transform: scale(1.25); }
.enum { font-size: 10.5px; padding: 2px 8px; border-radius: 5px; background: rgba(0,0,0,.17); border: 1px solid rgba(255,255,255,.13); color: #fff; transition: .2s; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enum:hover { border-color: rgba(157,140,242,.8); background: rgba(157,140,242,.2); }
.multi { display: flex; flex-wrap: wrap; gap: 4px; }
.multi button { font-size: 10px; padding: 1px 7px; border-radius: 99px; border: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.6); transition: .2s; }
.multi button.on { background: rgba(157,140,242,.35); border-color: rgba(200,190,255,.6); color: #fff; }
.bind { font-size: 10.5px; padding: 2px 8px; border-radius: 5px; background: rgba(0,0,0,.17); border: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.75); min-width: 44px; }
.bind.wait { border-color: var(--accent); color: var(--accent-light); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .5; } }
.gui-empty { grid-column: 1 / -1; text-align: center; padding: 30px; font-size: 12px; color: rgba(255,255,255,.45); }

.vp-hint { position: absolute; left: 50%; bottom: 40%; transform: translateX(-50%); padding: 9px 18px; border-radius: 999px; background: rgba(14,14,20,.65); backdrop-filter: blur(10px); font-size: 13px; color: rgba(255,255,255,.75); opacity: 0; pointer-events: none; transition: .3s; white-space: nowrap; z-index: 3; }
.vp-hint.show { opacity: 1; pointer-events: auto; }
.vp-hint button { color: var(--accent-light); text-decoration: underline; }

/* ===== BENTO ===== */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; padding: 22px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border: 1px solid var(--border); overflow: hidden; transform-style: preserve-3d; transition: border-color .3s, transform .2s ease-out; }
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(157,140,242,.14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { border-color: rgba(157,140,242,.35); }
.card:hover::before { opacity: 1; }
.card.big { grid-row: span 2; }
.card.wide { grid-column: span 2; }
.card h3 { font-size: 19px; letter-spacing: -.02em; margin: 18px 0 6px; }
.card p { font-size: 14.5px; color: var(--text-dim); }
.card-visual { height: 150px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--border); position: relative; overflow: hidden; display: grid; place-items: center; }
.card.big .card-visual { height: 340px; }
.blur-demo .blob { position: absolute; border-radius: 50%; filter: blur(2px); animation: float 9s ease-in-out infinite; }
.blur-demo .b1 { width: 160px; height: 160px; background: #9d8cf2; left: 10%; top: 12%; }
.blur-demo .b2 { width: 120px; height: 120px; background: #f2a68c; right: 12%; top: 40%; animation-delay: -3s; }
.blur-demo .b3 { width: 100px; height: 100px; background: #6ee7c8; left: 35%; bottom: 6%; animation-delay: -6s; }
@keyframes float { 50% { transform: translate(30px, -24px) scale(1.1); } }
.glass-chip { position: relative; padding: 46px 40px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); font-weight: 600; font-size: 15px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.msdf span { font-size: 90px; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(180deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: zoom 5s ease-in-out infinite; }
@keyframes zoom { 50% { transform: scale(1.5); } }
.sdf-rect { width: 110px; height: 70px; border: 2px solid var(--accent); background: rgba(157,140,242,.15); box-shadow: 0 0 30px rgba(157,140,242,.4); animation: morph 5s ease-in-out infinite; }
@keyframes morph { 0%,100% { border-radius: 4px; } 50% { border-radius: 36px; } }
.pipe { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.pipe span { font-family: var(--mono); font-size: 12px; padding: 4px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.pipe i { width: 2px; height: 12px; background: linear-gradient(var(--accent), transparent); margin: 0 auto; }
.anim { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 20px; }
.anim .track { width: 180px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.08); position: relative; }
.anim .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: slide 2.4s cubic-bezier(.33,1,.68,1) infinite alternate; }
@keyframes slide { to { left: 157px; } }
.anim .curve { width: 180px; height: 50px; }
.anim svg { width: 100%; height: 100%; overflow: visible; }

/* ===== LAB ===== */
.lab { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.lab-canvas-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-2); background: #0d0d14; min-height: 420px; }
#lab { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; }
.lab-legend { position: absolute; left: 14px; top: 12px; display: flex; gap: 14px; font-size: 12px; color: var(--text-dim); pointer-events: none; }
.lab-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-a { background: var(--accent); } .lg-b { background: #6ee7c8; }
.lab-panel { border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.ctrl label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ctrl output { color: var(--accent-light); font-variant-numeric: tabular-nums; }
.seg { display: flex; padding: 3px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.seg button { flex: 1; font-size: 12.5px; padding: 6px 4px; border-radius: 7px; color: var(--text-dim); transition: .2s; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 25%), rgba(255,255,255,.12) var(--p, 25%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
.lab-stats { display: grid; gap: 8px; }
.lab-stats div { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.2); border: 1px solid var(--border); }
.lab-stats span { color: var(--text-muted); }
.lab-stats b { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ===== MODULE CATALOG ===== */
.mod-toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13.5px; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.on { background: rgba(157,140,242,.18); border-color: rgba(157,140,242,.5); color: var(--text); }
.chip small { color: var(--text-muted); margin-left: 4px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 999px; color: var(--text-muted); min-width: 280px; flex: 0 1 340px; }
.search:focus-within { border-color: rgba(157,140,242,.6); }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; padding: 10px 0; min-width: 0; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.mod { padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); transition: transform .25s, border-color .25s, opacity .3s; animation: pop .45s cubic-bezier(.2,.8,.2,1) both; }
.mod:hover { transform: translateY(-3px); border-color: rgba(157,140,242,.35); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.mod-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mod h3 { font-size: 16.5px; letter-spacing: -.01em; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em; }
.tag-Combat { background: rgba(255,138,122,.13); color: #ffb3a8; }
.tag-Movement { background: rgba(110,231,200,.13); color: #9af0d6; }
.tag-Player { background: rgba(242,200,110,.13); color: #f5d690; }
.tag-Render { background: rgba(157,140,242,.16); color: var(--accent-light); }
.mod p { font-size: 13.5px; color: var(--text-dim); margin: 8px 0 12px; }
.mod-sets { display: flex; flex-wrap: wrap; gap: 5px; }
.mod-sets span { font-size: 11px; font-family: var(--mono); padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--text-muted); }
.mod-sets span.hit { color: var(--accent-light); background: rgba(157,140,242,.2); }
.mod-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.mod-foot button { color: var(--accent-light); font-size: 12px; font-weight: 600; }
.mod-foot button:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--text-muted); padding: 40px; }
mark { background: rgba(157,140,242,.35); color: inherit; border-radius: 3px; }

/* ===== INSTALL ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { position: relative; padding: 26px; border-radius: var(--radius); }
.num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(157,140,242,.18); color: var(--accent-light); font-weight: 700; margin-bottom: 16px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--text-dim); }
.build { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.term { border-radius: var(--radius); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.12); }
.term-bar i:nth-child(1) { background: #ff6b5e; } .term-bar i:nth-child(2) { background: #ffbd2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; }
.copy { margin-left: auto; font-size: 12px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border-2); color: var(--text-dim); }
.copy:hover { color: var(--text); }
#term { font-family: var(--mono); font-size: 13px; line-height: 1.75; padding: 18px; min-height: 250px; color: var(--text-dim); white-space: pre-wrap; }
#term .p { color: var(--accent-light); } #term .ok { color: var(--on); } #term .w { color: var(--text); }
#term .cur { display: inline-block; width: 8px; height: 15px; background: var(--accent-light); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.dl { border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; justify-content: center; }
.dl-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(157,140,242,.18); color: var(--accent-light); margin-bottom: 8px; }
.dl h3 { font-family: var(--mono); font-size: 16px; }
.dl .btn { margin: 12px 0 6px; }
.req { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.req span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-muted); }

/* ===== FAQ ===== */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: 14px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--accent-light); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--text-dim); font-size: 15px; }

/* FOOTER */
.footer { max-width: 1180px; margin: 0 auto; padding: 40px 16px 50px; border-top: 1px solid var(--border); display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 13.5px; color: var(--text-muted); }
.to-top:hover { color: var(--text); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); padding: 10px 20px; border-radius: 999px; background: rgba(20,20,28,.9); border: 1px solid var(--border-2); backdrop-filter: blur(10px); font-size: 14px; opacity: 0; transition: .3s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card.big { grid-row: auto; grid-column: span 2; }
  .card.big .card-visual { height: 240px; }
  .lab { grid-template-columns: 1fr; }
  .build { grid-template-columns: 1fr; }
  .viewport { aspect-ratio: auto; height: 640px; }
  .gui { width: 92%; height: 76%; top: 56%; }
}
@media (max-width: 760px) {
  .nav { gap: 10px; }
  .nav-links { position: absolute; top: 60px; left: 16px; right: 16px; flex-direction: column; padding: 10px; border-radius: 18px; background: rgba(20,20,28,.95); border: 1px solid var(--border); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .25s; }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 10px 14px; }
  .nav > .btn { margin-left: auto; }
  .burger { display: flex; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .card.big, .card.wide { grid-column: auto; }

  .gui-side { width: 108px; padding: 10px 6px; }
  .gui-grid { grid-template-columns: 1fr; }
  .gui-side-foot { flex-direction: column; }
  .search { min-width: 0; flex: 1 1 100%; }
  .section { padding: 80px 16px; }
  .footer { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
