:root { --bg: #fff; --panel: rgba(255,255,255,.86); --card: #f8fafc; --line: #e2e8f0; --line2: #cbd5e1; --ink: #0f172a; --dim: #64748b; --cy: #06b6d4; --cy2: #0891b2; --cybg: rgba(6,182,212,.12); --or: #f97316; --or2: #ea580c; --orbg: rgba(249,115,22,.13); --shadow: 0 12px 32px -8px rgba(15,23,42,.1), 0 4px 12px -4px rgba(15,23,42,.05); color-scheme: light; }
* { box-sizing: border-box; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
h1, h2, h3, h4, .brand b, .pills a, .gc-t { font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif; }
html, body { height: 100%; margin: 0; } body { background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 500; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; } button { cursor: pointer; } [hidden] { display: none !important; } a { color: var(--cy2); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#app { position: fixed; inset: 0; z-index: 1; display: grid; grid-template-rows: auto minmax(0,1fr); padding: 12px; gap: 12px; }
.glass { background: var(--panel); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(226,232,240,.95); box-shadow: var(--shadow); }
.sp { flex: 1; } .dim { color: var(--dim); }
#top { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-radius: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); } .logo { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 16px -6px rgba(6,182,212,.55); } .brand b { font-size: 25px; letter-spacing: -.03em; } .brand i { font-style: normal; color: var(--cy); }
.pills { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(241,245,249,.8); border: 1px solid var(--line); } .pills a, .pills button { height: 32px; padding: 0 15px; border: 0; border-radius: 12px; background: transparent; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--dim); text-decoration: none; font-size: 13.5px; transition: background .2s, color .2s, transform .14s cubic-bezier(.34,1.56,.64,1); } .pills a:hover, .pills button:hover { color: var(--ink); background: #fff; } .pills a:active, .pills button:active { transform: scale(.95); }
.pills a.on, .pills button.on { color: #fff; background: linear-gradient(135deg, #22d3ee, #0891b2 60%, #0e7490); box-shadow: 0 6px 14px -4px rgba(6,182,212,.6), inset 0 1px 0 rgba(255,255,255,.45); }
#view { min-height: 0; overflow-y: auto; border-radius: 24px; padding: 2px; animation: rise .3s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.btn { height: 36px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; color: #334155; text-decoration: none; transition: transform .14s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s; white-space: nowrap; } .btn:hover:not(:disabled) { background: #f1f5f9; transform: translateY(-2px); } .btn:active:not(:disabled) { transform: scale(.96); } .btn:disabled { opacity: .5; cursor: default; } .btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 10px; }
.btn.pri { background: linear-gradient(135deg, #f97316, #ea580c); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -4px rgba(249,115,22,.45), inset 0 1px 0 rgba(255,255,255,.3); } .btn.pri:hover:not(:disabled) { background: linear-gradient(135deg, #fb923c, #ea580c); }
.btn.cy { background: linear-gradient(135deg, #06b6d4, #0284c7); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -4px rgba(6,182,212,.45), inset 0 1px 0 rgba(255,255,255,.3); } .btn.cy:hover:not(:disabled) { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.btn.on { background: var(--orbg); border-color: rgba(249,115,22,.5); color: var(--or2); }
.in, textarea.in { height: 38px; padding: 0 13px; border: 1px solid var(--line2); border-radius: 12px; background: repeating-linear-gradient(45deg, #fff 0 6px, #f8fafc 6px 12px); width: 100%; } .in:focus { outline: 0; border-color: var(--cy); box-shadow: 0 0 0 3px var(--cybg); background: #fff; } textarea.in { height: auto; padding: 10px 13px; resize: vertical; }
.page { max-width: 1240px; margin: 0 auto; padding: 8px 6px 40px; }
.hero { border-radius: 28px; padding: 34px 36px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -.035em; line-height: 1.05; } .hero h1 i { font-style: normal; color: var(--cy); } .hero h1 u { text-decoration: none; color: var(--or); } .hero p { margin: 0 0 18px; color: #475569; font-size: 16px; max-width: 52ch; line-height: 1.5; } .hero .row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .art { margin-left: auto; width: 260px; height: 150px; border-radius: 20px; background: linear-gradient(135deg, #cffafe, #fff7ed); border: 1px solid var(--line); display: grid; place-items: center; font-size: 64px; box-shadow: var(--shadow); } @media (max-width: 760px) { .hero .art { display: none; } .hero { padding: 24px 20px; } }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 16px; } .bar .in { width: 240px; } .bar h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; } .pleat { position: relative; display: inline-block; padding: 2px 0 6px; } .pleat::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--cy) 0 10px, #67e8f9 10px 14px, var(--or) 14px 24px, #fdba74 24px 28px); opacity: .75; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gc { display: block; border-radius: 20px; background: #fff; border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .2s; } .gc:hover { transform: translateY(-4px); border-color: rgba(6,182,212,.6); box-shadow: 0 16px 30px -12px rgba(6,182,212,.55); }
.gc-i { aspect-ratio: 16/9; background: linear-gradient(135deg, #cffafe, #ffedd5) center / cover; display: grid; place-items: center; font-size: 42px; position: relative; } .gc-k { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: rgba(15,23,42,.72); color: #fff; } .gc-k.d3 { background: rgba(249,115,22,.92); }
.gc-b { padding: 11px 13px 13px; } .gc-t { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gc-m { display: flex; gap: 12px; align-items: center; margin-top: 5px; color: var(--dim); font-size: 12.5px; font-weight: 600; } .gc-m svg { width: 14px; height: 14px; } .gc-m span { display: inline-flex; align-items: center; gap: 4px; } .gc-m .sp { flex: 1; }
.empty { text-align: center; padding: 60px 20px; color: var(--dim); } .empty b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 6px; font-family: 'Space Grotesk', sans-serif; }
.more { text-align: center; margin-top: 22px; }
/* game page */
.gp { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; align-items: start; } @media (max-width: 980px) { .gp { grid-template-columns: 1fr; } }
.stage { position: relative; border-radius: 22px; overflow: hidden; background: #04141c; aspect-ratio: 16/9; box-shadow: 0 22px 50px -14px rgba(15,23,42,.45); border: 1px solid rgba(15,23,42,.2); } .stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; } .stage:fullscreen { border-radius: 0; }
.cover { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(6,182,212,.35), rgba(4,20,28,.92)) center / cover; z-index: 2; } .cover .big { width: 84px; height: 84px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px -6px rgba(249,115,22,.7), inset 0 2px 0 rgba(255,255,255,.4); transition: transform .2s cubic-bezier(.34,1.56,.64,1); } .cover .big:hover { transform: scale(1.1); } .cover svg { width: 36px; height: 36px; fill: #fff; stroke: #fff; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.side { padding: 18px; border-radius: 22px; } .side h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; } .side p { color: #475569; line-height: 1.5; white-space: pre-wrap; word-break: break-word; } .side .by { color: var(--dim); font-weight: 600; margin-bottom: 10px; } .side .stats { display: flex; gap: 14px; color: var(--dim); font-weight: 700; margin: 10px 0 14px; }
pre.code { margin: 12px 0 0; padding: 14px 16px; border-radius: 16px; background: #0f1b2a; color: #d6e6f5; overflow: auto; max-height: 360px; font: 12.5px/1.55 'JetBrains Mono', ui-monospace, monospace; }
/* studio */
.st { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr); gap: 10px; } .st-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 20px; } .st-top .in { width: 220px; height: 34px; }
.st-main { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 10px; min-height: 0; } @media (max-width: 900px) { .st-main { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) minmax(0,1fr); } }
.pane { border-radius: 22px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; } .pane-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.ed { flex: 1; min-height: 0; position: relative; } textarea.code { position: absolute; inset: 0; width: 100%; height: 100%; padding: 14px 16px; border: 0; background: rgba(255,255,255,.55); font: 13.5px/1.6 'JetBrains Mono', ui-monospace, monospace; tab-size: 4; white-space: pre; overflow: auto; resize: none; color: #0f172a; } textarea.code:focus { outline: 0; background: rgba(255,255,255,.8); }
.pv { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 8px; padding: 10px; } .pv .stage { aspect-ratio: auto; height: 100%; min-height: 160px; max-height: 100%; }
.pvwrap { display: grid; place-items: center; min-height: 0; } .pvwrap .stage { width: min(100%, calc((100vh - 360px) * 16 / 9)); height: auto; aspect-ratio: 16/9; }
.log { max-height: 110px; overflow: auto; padding: 8px 10px; border-radius: 12px; background: #0f1b2a; color: #bde6f2; font: 12px/1.5 'JetBrains Mono', monospace; white-space: pre-wrap; } .log .e { color: #fca5a5; } .log:empty::before { content: 'Messages from print() show up here'; color: #64748b; }
.errbox { padding: 9px 12px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-weight: 600; font-size: 13px; }
/* blocks */
.be { display: grid; grid-template-columns: 250px minmax(0,1fr); height: 100%; min-height: 0; } .be-pal { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: rgba(248,250,252,.7); } .be-cats { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; } .be-cat { border: 1px solid var(--line); background: #fff; border-radius: 10px; height: 26px; padding: 0 9px; font-size: 11.5px; font-weight: 700; color: var(--dim); border-left: 4px solid var(--bc); } .be-cat.on { background: var(--bc); color: #fff; border-color: var(--bc); }
.be-list { padding: 4px 8px 8px; display: grid; gap: 7px; } .be-rep { padding: 4px 8px 14px; border-top: 1px solid var(--line); } .be-rep h4 { margin: 10px 0 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; } .be-chips { display: flex; flex-wrap: wrap; gap: 5px; } .be-chip { border: 1px solid var(--line2); background: #fff; border-radius: 99px; height: 24px; padding: 0 10px; font-size: 11.5px; font-weight: 600; } .be-chip:hover { border-color: var(--cy); color: var(--cy2); } .be-chip.var { background: var(--cybg); }
.be-scripts { overflow: auto; padding: 14px; min-height: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; } .be-script { padding: 0; min-width: 320px; } .be-empty { color: var(--dim); display: grid; gap: 6px; max-width: 36ch; padding: 20px; border: 2px dashed var(--line2); border-radius: 18px; } .be-empty b { color: var(--ink); font-family: 'Space Grotesk'; font-size: 17px; }
.be-newzone { width: 100%; min-height: 40px; border: 2px dashed var(--line2); border-radius: 14px; display: grid; place-items: center; color: #94a3b8; font-size: 12.5px; } .be-newzone.on { border-color: var(--cy); background: var(--cybg); color: var(--cy2); }
.bk { --bc: #06b6d4; border-radius: 12px; background: var(--bc); color: #fff; position: relative; font-size: 12.5px; box-shadow: 0 2px 0 rgba(0,0,0,.18); } .bk.hat { border-radius: 18px 18px 12px 12px; padding-top: 3px; } .bk.bad { outline: 3px solid #ef4444; } .bk.dragging { opacity: .35; }
.bk-row { display: flex; align-items: center; gap: 6px; padding: 7px 8px; flex-wrap: wrap; min-height: 34px; } .bk-grip { width: 8px; height: 18px; border-radius: 4px; background: repeating-linear-gradient(0deg, rgba(255,255,255,.55) 0 2px, transparent 2px 5px); cursor: grab; flex: none; } .bk-t { font-weight: 700; text-shadow: 0 1px 0 rgba(0,0,0,.15); }
.bk-in { height: 24px; border: 0; border-radius: 8px; background: #fff; color: #0f172a; padding: 0 8px; font: 500 12px 'JetBrains Mono', monospace; min-width: 3ch; } .bk-in:focus { outline: 2px solid #fde68a; } .bk-in.name { background: #fef3c7; font-weight: 600; } .bk-sel { height: 24px; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); color: #0f172a; padding: 0 22px 0 9px; font-weight: 700; font-size: 12px; position: relative; background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%); background-size: 4px 4px; background-position: calc(100% - 11px) 10px, calc(100% - 7px) 10px; background-repeat: no-repeat; }
.bk-acts { margin-left: auto; display: none; gap: 3px; } .bk:hover > .bk-row .bk-acts { display: inline-flex; } .bk-x { width: 22px; height: 22px; border: 0; border-radius: 7px; background: rgba(0,0,0,.22); color: #fff; font-size: 14px; line-height: 1; padding: 0; } .bk-x:hover { background: rgba(0,0,0,.45); }
.bk-stack { margin-left: 14px; padding: 2px 6px 2px 8px; display: flex; flex-direction: column; border-left: 4px solid rgba(0,0,0,.18); background: rgba(255,255,255,.18); min-height: 28px; border-radius: 0 0 0 4px; } .bk-stack .bk { margin: 0; } .bk-gap { height: 6px; margin: 0; border-radius: 4px; } .bk-gap.on { height: 14px; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.4); } .bk-hint { color: rgba(255,255,255,.8); font-size: 11.5px; padding: 4px 6px; } .bk-else { padding: 3px 10px; font-weight: 700; opacity: .9; } .bk-end { height: 8px; }
.be-script > .bk-stack { margin-left: 0; padding: 4px 0 4px 0; border: 0; background: none; } .be-script > .bk-stack .bk { }
.bk.pal { cursor: grab; } .bk.pal .bk-row { padding: 6px 7px; } .bk-ghost { position: fixed; z-index: 90; pointer-events: none; opacity: .92; transform: rotate(-1.5deg); filter: drop-shadow(0 12px 18px rgba(0,0,0,.3)); }
.bk-pop { position: fixed; z-index: 95; background: #fff; border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 18px 40px -10px rgba(15,23,42,.35); padding: 5px; overflow: auto; min-width: 140px; } .bk-opt { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 9px; padding: 6px 10px; font-weight: 600; } .bk-opt:hover { background: var(--cybg); } .bk-opt.on { background: var(--cy); color: #fff; }
/* menu and modal */
.menu { position: fixed; z-index: 80; background: #fff; border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 20px 44px -12px rgba(15,23,42,.35); padding: 6px; min-width: 240px; max-height: 70vh; overflow: auto; } .menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; font-weight: 600; } .menu button:hover { background: var(--cybg); }
.veil { position: fixed; inset: 0; z-index: 70; background: rgba(15,23,42,.35); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; } .modal { width: min(420px, 100%); border-radius: 24px; padding: 22px; background: #fff; box-shadow: 0 30px 70px -14px rgba(15,23,42,.5); animation: rise .25s ease both; } .modal h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.02em; } .modal label { display: block; font-weight: 700; font-size: 12.5px; color: var(--dim); margin: 10px 0 5px; } .modal .row { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; } .modal .err { color: #b91c1c; font-weight: 600; margin-top: 8px; min-height: 1em; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; } .toast { background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 14px 30px -8px rgba(15,23,42,.5); animation: rise .25s ease both; }
/* docs */
.docs { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 16px; align-items: start; } @media (max-width: 860px) { .docs { grid-template-columns: 1fr; } } .toc { padding: 14px; border-radius: 20px; position: sticky; top: 0; display: grid; gap: 2px; } .toc a { text-decoration: none; color: #475569; padding: 6px 10px; border-radius: 9px; font-weight: 600; } .toc a:hover { background: var(--cybg); color: var(--cy2); }
.doc { padding: 26px 30px; border-radius: 24px; line-height: 1.6; } .doc h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: -.03em; } .doc h2 { margin: 30px 0 8px; font-size: 24px; letter-spacing: -.02em; } .doc h3 { margin: 18px 0 4px; font-size: 16px; } .doc code { font: 12.5px 'JetBrains Mono', monospace; background: var(--cybg); padding: 1px 6px; border-radius: 6px; } .doc table { border-collapse: collapse; margin: 8px 0; } .doc td, .doc th { border-bottom: 1px solid var(--line); padding: 5px 12px 5px 0; text-align: left; vertical-align: top; } .doc td:first-child { white-space: nowrap; }
.doc pre.code { margin: 8px 0 12px; } .doc .try { margin: -4px 0 14px; }
.who { display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) { #top { flex-wrap: wrap; gap: 8px; } .pills a { padding: 0 10px; } body { overflow: auto; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
