:root{
  --blue:#0b66ff;
  --blue2:#287fff;
  --ink:#071332;
  --muted:#536784;
  --line:#d8e5f6;
  --soft:#f3f8ff;
  --card:#ffffff;
  --warn:#f49a20;
  --shadow:0 9px 22px rgba(48,95,160,.10);
  --radius:14px;
}
*{box-sizing:border-box}
html,body{height:100%;overflow:hidden}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:linear-gradient(180deg,#eef7ff 0,#f7fbff 52%,#eef6ff 100%);min-width:320px}
body.contrast{--ink:#031021;--muted:#314a6e;--line:#bad3f4;--soft:#e8f3ff;--shadow:0 12px 28px rgba(0,60,150,.16)}
a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,label[for]{cursor:pointer}svg{display:block;fill:currentColor}.hidden{display:none!important}
.site-header{height:50px;min-height:50px;background:rgba(255,255,255,.94);backdrop-filter:blur(16px);border-bottom:1px solid #dbe8fb;box-shadow:0 1px 0 rgba(188,210,238,.72);position:relative;z-index:50}.header-inner{height:100%;max-width:none;margin:0;display:flex;align-items:center;gap:10px;padding:0 14px}.brand{display:flex;align-items:center;gap:8px;min-width:0}.brand-mark{width:34px;height:34px;filter:drop-shadow(0 8px 12px rgba(0,90,255,.22))}.brand-copy{display:flex;flex-direction:column;line-height:1}.brand-copy strong{font-size:20px;letter-spacing:.18em;font-weight:1000;line-height:1}.brand-copy small{margin-top:1px;color:#8a9cb8;font-size:8px;font-weight:900;letter-spacing:.28em}.top-nav{display:none}.header-actions{margin-left:auto;display:flex;align-items:center;gap:8px;border-left:1px solid #d6e2f2;padding-left:10px}.icon-btn{width:34px;height:34px;border:0;background:transparent;color:#0b1738;display:grid;place-items:center;border-radius:12px}.icon-btn:hover{background:#f0f7ff}.icon-btn svg{width:25px}.sell-btn{height:36px;min-height:36px;padding:0 14px;border:0;border-radius:12px;background:linear-gradient(135deg,#0c63ff,#0754ef);color:#fff;font-size:13px;font-weight:950;display:flex;align-items:center;gap:9px;box-shadow:0 12px 24px rgba(0,84,239,.22)}.sell-btn svg{width:17px}
main{height:calc(100dvh - 76px);overflow:hidden}.category-strip{position:relative;z-index:10;height:44px;min-height:44px;max-width:none;margin:6px 10px 0;padding:4px;background:rgba(255,255,255,.84);border:1px solid #d6e3f5;border-radius:14px;box-shadow:0 8px 18px rgba(48,95,160,.10);display:grid;grid-template-columns:repeat(5,minmax(96px,1fr));align-items:center;gap:0;backdrop-filter:blur(18px);overflow:visible}.category{height:36px;min-height:36px;padding:0 12px;border:0;background:transparent;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;color:#071638;position:relative;line-height:1;overflow:visible}.category b{display:inline-block;font-size:12px;line-height:1;white-space:nowrap;font-weight:950}.cat-icon{width:22px;height:22px;min-width:22px;flex:0 0 22px;display:grid;place-items:center;border-radius:8px;color:#0f68ff;filter:none;transform:none;overflow:visible}.cat-icon svg{width:14px;height:14px}.category.active{background:linear-gradient(135deg,#0d66ff,#0755ef);color:#fff;border-radius:10px;box-shadow:0 5px 13px rgba(11,102,255,.22)}.category.active .cat-icon{background:rgba(255,255,255,.18);color:#fff;border-radius:8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.28)}.category.passive{cursor:default}
.content-zone.workspace{max-width:none;height:calc(100% - 50px);min-height:0;margin:0;padding:10px;display:grid;grid-template-columns:260px minmax(360px,1fr) 330px;gap:10px;align-items:stretch;overflow:hidden}.panel{min-height:0;background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.left-panel,.inspector-panel{padding:10px;display:grid;gap:10px;overflow:auto;align-content:start}.drop-zone{min-height:112px;border:1px dashed #accaf0;border-radius:12px;background:linear-gradient(180deg,#f8fbff,#eef6ff);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:12px;color:#31506f}.drop-zone.dragover,.dragging .drop-zone,.dragging .canvas-frame{border-color:var(--blue);background:#eaf4ff;box-shadow:inset 0 0 0 2px rgba(11,102,255,.12)}.drop-zone>svg{width:34px;height:34px;color:#0b66ff;filter:drop-shadow(0 10px 12px rgba(0,90,255,.2))}.drop-zone strong{font-size:17px;color:#071332}.drop-zone span{font-size:11px;font-weight:750;line-height:1.25;max-width:220px;color:#5b7192}.outline-btn{min-height:30px;padding:0 12px;border-radius:9px;border:1px solid #ccdff6;background:#fff;color:#075dff;box-shadow:0 6px 16px rgba(52,100,170,.07);display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:950;white-space:nowrap}.control-card,.issue-card,.control-section{border:1px solid #dbe7f8;border-radius:12px;background:#fff;padding:10px;box-shadow:0 5px 16px rgba(62,107,168,.06)}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.section-kicker{display:inline-flex;align-items:center;gap:8px;text-transform:uppercase;letter-spacing:.08em;color:#0863ff;font-size:10px;font-weight:1000}.section-kicker.dark{color:#0a1d3f}.badge-soft{min-width:28px;text-align:center;background:#f2f7ff;border:1px solid #d5e5fa;color:#075dff;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:950}.sample-list{display:grid;gap:8px;max-height:150px;overflow:auto}.sample-list button{width:100%;text-align:left;border:1px solid #d8e5f6;background:#fff;border-radius:10px;padding:8px 9px;color:#173057;font-size:12px;font-weight:950;cursor:pointer;box-shadow:0 4px 14px rgba(52,100,170,.05)}.sample-list small{display:block;color:#637b9d;font-size:10px;font-weight:750;margin-top:2px}.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.stats-grid span{min-height:58px;background:#fff;border:1px solid #d8e5f6;border-radius:12px;padding:9px 10px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 6px 18px rgba(43,91,154,.07);font-size:13px;font-weight:1000;letter-spacing:-.02em;overflow:hidden;text-overflow:ellipsis}.stats-grid b{display:block;margin-bottom:3px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#6780a6;font-weight:900}.help-text{display:none}.help-text.visible{display:block;margin:0;color:#59718f;font-size:11px;font-weight:750;line-height:1.35}
.viewport-panel{display:grid;grid-template-rows:56px minmax(0,1fr);overflow:hidden}.viewport-toolbar{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 12px;border-bottom:1px solid #dce8f7;background:linear-gradient(180deg,#fff,#f8fbff)}.viewport-toolbar h2{margin:2px 0 0;font-size:18px;line-height:1.05;letter-spacing:-.02em;word-break:break-word}.toolbar-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.tool-btn{height:32px;border:1px solid #cbdcf2;background:#fff;color:#244466;border-radius:9px;font-size:11px;font-weight:950;padding:0 10px;box-shadow:0 5px 13px rgba(52,100,170,.06)}.tool-btn:hover,.tool-btn.active{background:linear-gradient(135deg,#0d66ff,#0755ef);color:#fff;border-color:#0755ef}.viewport-wrap{position:relative;height:auto;min-height:0;overflow:hidden}.checker{background-color:#fff;background-image:linear-gradient(45deg,#edf5ff 25%,transparent 25%),linear-gradient(-45deg,#edf5ff 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#edf5ff 75%),linear-gradient(-45deg,transparent 75%,#edf5ff 75%);background-position:0 0,0 10px,10px -10px,-10px 0;background-size:20px 20px}#glCanvas{display:block;width:100%;height:100%}.viewport-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:#456487;padding:24px;pointer-events:none;background:radial-gradient(circle at 50% 43%,rgba(255,255,255,.68) 0 16%,rgba(246,251,255,.42) 45%,rgba(219,236,255,.32) 100%)}.viewport-empty img{width:78px;filter:drop-shadow(0 12px 18px rgba(0,90,255,.18));margin-bottom:12px}.viewport-empty strong{font-size:22px;color:#071332}.viewport-empty span{font-size:13px;font-weight:750;line-height:1.45;max-width:390px;margin-top:5px}.hud-panel{position:absolute;left:10px;bottom:10px;min-width:168px;padding:9px 10px;border-radius:12px;background:rgba(255,255,255,.86);border:1px solid rgba(201,220,244,.9);box-shadow:0 8px 20px rgba(48,95,160,.12);backdrop-filter:blur(12px);pointer-events:none}.hud-panel span{display:block;color:#075dff;text-transform:uppercase;font-size:10px;letter-spacing:.08em;font-weight:1000}.hud-panel b{display:block;margin-top:3px;font-size:14px}.hud-panel small{display:block;margin-top:3px;color:#56708f;font-size:10px;font-weight:800}
.tabs{display:flex;gap:4px;padding:4px;border-radius:12px;background:#edf6ff;position:sticky;top:0;z-index:2}.tab{height:31px;min-width:0;flex:1;border:0;border-radius:9px;background:transparent;color:#31506f;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:950}.tab.active{background:#fff;color:#075dff;box-shadow:0 7px 16px rgba(52,100,170,.08)}.tab-panel.active{display:grid;gap:10px}.field{display:grid;gap:5px;margin-top:9px}.field span{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#1d365f;font-weight:950}.field em{font-style:normal;color:#075dff;font-weight:1000}.field input[type="range"]{width:100%;accent-color:#0b66ff}.field input[type="number"],.field select{width:100%;height:34px;border:1px solid #cbdcf2;border-radius:10px;background:#fff;padding:0 10px;color:#163059;font-size:12px;font-weight:800;outline:0}.field input:focus,.field select:focus{border-color:#7bb1ff;box-shadow:0 0 0 4px rgba(11,102,255,.11)}.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.primary-btn{min-height:34px;padding:0 12px;border:0;border-radius:10px;background:linear-gradient(135deg,#0e6aff,#0556f0);color:#fff;font-size:12px;font-weight:950;display:inline-flex;align-items:center;justify-content:center;gap:10px;box-shadow:0 13px 24px rgba(0,90,255,.20);white-space:nowrap}.primary-btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.primary-btn.full{width:100%;margin-top:12px}.download-link{display:flex;align-items:center;justify-content:center;min-height:32px;margin-top:8px;border:1px solid #cfe0f5;border-radius:10px;background:#f7fbff;color:#075dff;font-size:11px;font-weight:950;text-align:center;padding:6px 8px}
.site-footer{height:26px;min-height:26px;background:#061531;color:#9fb7d8;border-top:1px solid #17305b;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 14px;font-size:12px;font-weight:750;overflow:hidden}.site-footer span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1200px){html,body,main{overflow:auto}.content-zone.workspace{height:auto;min-height:calc(100dvh - 126px);grid-template-columns:230px minmax(320px,1fr);overflow:visible}.inspector-panel{grid-column:1/-1;grid-template-columns:220px 1fr}.tab-panel.active{grid-column:2}.viewport-wrap{height:560px}.site-footer{position:relative}.sample-list{max-height:120px}}
@media(max-width:860px){.site-header,.header-inner{height:48px;min-height:48px}.brand-copy strong{font-size:17px}.brand-copy small{display:none}.sell-btn{padding:0 10px}.category-strip{grid-template-columns:repeat(5,minmax(116px,1fr));overflow-x:auto;overflow-y:visible}.content-zone.workspace{grid-template-columns:1fr;padding:8px}.left-panel,.inspector-panel{overflow:visible}.inspector-panel{grid-template-columns:1fr}.tab-panel.active{grid-column:auto}.viewport-wrap{height:500px}.site-footer{font-size:11px}}
@media(max-width:560px){.header-actions{border-left:0;padding-left:0}.sell-btn{font-size:0}.sell-btn svg{margin:0}.category-strip{grid-template-columns:repeat(5,minmax(118px,1fr))}.viewport-toolbar{min-height:auto;align-items:flex-start;flex-direction:column}.viewport-wrap{height:420px}.stats-grid,.export-grid{grid-template-columns:1fr}.site-footer{justify-content:center}.site-footer span:nth-child(2){display:none}}
