:root {
  --bg: #f3f1eb;
  --paper: #fbfaf6;
  --ink: #171817;
  --muted: #77776f;
  --line: #d9d7cf;
  --soft: #e9e6de;
  --acid: #d9ff43;
  --coral: #ff7058;
  --violet: #8772ff;
  --cyan: #66d6d2;
  --shadow: 0 14px 45px rgba(27, 26, 22, .07);
  --sidebar: 234px;
  --top: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; min-width: 320px; }
button, textarea, select { font: inherit; }
button { color: inherit; }
.noise { position: fixed; inset: 0; opacity: .025; pointer-events: none; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: rgba(251,250,246,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: var(--ink); color: var(--acid); font-weight: 900; font-size: 12px; transform: rotate(-3deg); }
.brand strong { font-weight: 900; }.brand i { color: var(--coral); font-style: normal; font-weight: 900; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.status-pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: 12px; color: var(--muted); background: var(--paper); }
.status-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #aaa; }
.status-pill.ready span { background: #79c936; box-shadow: 0 0 0 4px rgba(121,201,54,.12); }
.icon-btn { border: 1px solid var(--line); background: var(--paper); width: 34px; height: 34px; cursor: pointer; }
.primary, .secondary { border: 1px solid var(--ink); cursor: pointer; font-weight: 750; }
.primary { background: var(--ink); color: white; }.primary.small { padding: 9px 14px; font-size: 12px; }
.secondary { background: transparent; padding: 11px 14px; }.full { width: 100%; }

.sidebar { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--sidebar); background: #e9e6de; border-right: 1px solid var(--line); padding: 24px 16px 18px; display: flex; flex-direction: column; justify-content: space-between; z-index: 15; }
.nav-label { margin: 0 10px 10px; font-size: 10px; color: #8b8980; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.project-label { margin-top: 32px; }
.project-heading { display:flex; align-items:center; justify-content:space-between; margin-top:28px; }.project-heading .project-label { margin-top:0; margin-bottom:8px; }.project-heading button { width:24px; height:24px; margin:0 4px 8px 0; border:1px solid #c9c5bb; background:var(--paper); cursor:pointer; font-weight:800; }
.project-list { display:grid; gap:7px; max-height:310px; overflow:auto; padding:1px 5px 8px 0; }.project-list::-webkit-scrollbar{width:4px}.project-list::-webkit-scrollbar-thumb{background:#c5c1b7}.project-item { position:relative; width:100%; padding:10px 28px 10px 10px; display:grid; grid-template-columns:29px minmax(0,1fr); align-items:center; gap:9px; border:1px solid transparent; background:transparent; text-align:left; cursor:pointer; }.project-item:hover { background:rgba(255,255,255,.45); }.project-item.active { border-color:var(--ink); background:var(--paper); box-shadow:3px 3px 0 #d5d1c8; }.project-thumb { width:29px; height:29px; display:grid; place-items:center; background:#d8d4ca; font-size:11px; }.project-item.active .project-thumb { background:var(--coral); }.project-copy { min-width:0; }.project-copy strong,.project-copy small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.project-copy strong { font-size:11px; }.project-copy small { margin-top:3px; color:var(--muted); font-size:8px; }.project-copy em { color:#6a58dc; font-style:normal; }.project-delete { position:absolute; right:5px; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#aaa69d; cursor:pointer; opacity:0; }.project-item:hover .project-delete { opacity:1; }
.nav-item { width: 100%; border: 0; background: transparent; padding: 11px 12px; margin-bottom: 4px; display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer; border-radius: 4px; font-size: 13px; }
.nav-item span { font-size: 16px; }.nav-item em { margin-left: auto; font-size: 10px; font-style: normal; background: #d4d0c6; padding: 3px 6px; border-radius: 10px; }
.nav-item.active { background: var(--ink); color: white; }.nav-item.active span { color: var(--acid); }
.project-card { background: var(--paper); border: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 9px; box-shadow: 4px 4px 0 #d5d1c8; }
.project-card .project-icon { width: 30px; height: 30px; display: grid; place-items: center; background: var(--coral); }
.project-card div { min-width: 0; }.project-card strong, .project-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-card strong { font-size: 12px; }.project-card small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.project-card button { border: 0; background: none; margin-left: auto; cursor: pointer; }
.sidebar-foot { display: flex; gap: 10px; align-items: center; padding: 12px 8px 0; border-top: 1px solid #d4d0c7; }
.mini-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); font-size: 10px; font-weight: 900; }
.sidebar-foot strong, .sidebar-foot small { display: block; }.sidebar-foot strong { font-size: 11px; }.sidebar-foot small { color: var(--muted); font-size: 9px; margin-top: 3px; }

main { margin: var(--top) 0 0 var(--sidebar); min-height: calc(100vh - var(--top)); padding: 48px clamp(22px, 4vw, 64px) 80px; }
.view { display: none; max-width: 1260px; margin: 0 auto; animation: rise .35s ease both; }.active-view { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hero-row { display: flex; justify-content: space-between; align-items: end; margin-bottom: 32px; gap: 30px; }
.eyebrow { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: .16em; color: var(--muted); margin: 0 0 17px; }
h1 { font-size: clamp(36px, 4.4vw, 66px); line-height: .98; letter-spacing: -.065em; margin: 0; max-width: 780px; font-weight: 850; }
h1 span { color: #a4a198; }
h2 { font-size: clamp(32px, 4vw, 54px); letter-spacing: -.05em; margin: 0; }
.section-lead { color: var(--muted); max-width: 620px; font-size: 15px; line-height: 1.8; }
.hero-note { width: 190px; padding: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.35); transform: rotate(1.5deg); }
.hero-note span, .hero-note small { display: block; font-size: 10px; color: var(--muted); }.hero-note strong { display: block; font-size: 27px; margin: 6px 0; }
.meter { height: 5px; background: #ddd9d0; margin-bottom: 8px; }.meter i { display: block; height: 100%; background: var(--coral); transition: width .4s; }

.panel { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.prompt-panel { margin-bottom: 18px; }
.panel-head { min-height: 58px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 18px; gap: 14px; }
.panel-head > div { display: flex; align-items: center; gap: 10px; }.step { display: grid; place-items: center; width: 25px; height: 25px; background: var(--ink); color: white; font: 10px ui-monospace, monospace; }
.panel-head strong { font-size: 13px; }.version { font: 9px ui-monospace, monospace; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.example-menu label { font-size: 10px; color: var(--muted); }.example-menu select { border: 0; background: transparent; font-size: 11px; font-weight: 700; outline: none; }
.prompt-box { margin: 18px; border: 1px solid #bab7ae; background: #fff; }
.prompt-box textarea { display: block; width: 100%; min-height: 118px; border: 0; padding: 20px; resize: vertical; outline: none; color: var(--ink); line-height: 1.8; font-size: 15px; background: transparent; }
.prompt-bottom { border-top: 1px solid var(--line); min-height: 50px; display: flex; align-items: center; padding-left: 13px; gap: 8px; }
.chips { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }.chips span { border: 1px solid var(--line); background: #f5f3ee; padding: 4px 7px; font-size: 9px; }
.count { color: var(--muted); font-size: 9px; }.generate-btn { align-self: stretch; border: 0; margin-left: 5px; padding: 0 18px; background: var(--acid); cursor: pointer; display: flex; gap: 8px; align-items: center; border-left: 1px solid var(--ink); }
.generate-btn:hover { background: #caff00; }.generate-btn:disabled { filter: grayscale(1); cursor: wait; }.generate-btn small { font-size: 9px; opacity: .5; margin-left: 8px; }
.message { display: none; margin: -8px 18px 18px; padding: 10px 12px; font-size: 11px; background: #fff0e9; border-left: 3px solid var(--coral); }.message.show { display: block; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; align-items: start; }
.sticky { position: sticky; top: var(--top); background: var(--paper); z-index: 4; }
.segmented { border: 1px solid var(--line); padding: 2px; }.segmented button { border: 0; background: transparent; font-size: 9px; padding: 6px 9px; cursor: pointer; }.segmented button.active { background: var(--ink); color: white; }
.tab-content { display: none; }.tab-content.active { display: block; }
.schema-section { padding: 18px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }.section-title div { display: flex; gap: 8px; align-items: center; }.section-title b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }.section-title span { font: 9px ui-monospace, monospace; color: var(--muted); }.section-title button { border: 0; background: none; font-size: 18px; cursor: pointer; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.field { border: 1px solid var(--line); padding: 10px 11px; background: white; }.field.wide { grid-column: 1 / -1; }.field label { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 5px; }.field input { border: 0; outline: none; width: 100%; font-weight: 700; background: transparent; }
.loop { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 4px; }.loop-item { min-width: 94px; border: 1px solid var(--ink); background: white; padding: 12px 8px; text-align: center; font-size: 10px; position: relative; }.loop-item b { display: block; color: var(--coral); font: 8px ui-monospace, monospace; margin-bottom: 5px; }.loop-arrow { color: var(--muted); }
.entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.entity-card { border: 1px solid var(--line); padding: 11px; background: white; }.entity-card header { display: flex; justify-content: space-between; gap: 6px; }.entity-card strong { font-size: 11px; }.entity-card code { font-size: 8px; color: var(--violet); }.entity-card p { font-size: 9px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.system-map { min-height: 240px; position: relative; background-image: radial-gradient(#d1cec5 1px, transparent 1px); background-size: 16px 16px; overflow: hidden; }
.system-map svg { width: 100%; height: 240px; }.system-map line { stroke: #9d9a91; stroke-width: 1; stroke-dasharray: 4 4; }.system-node { position: absolute; transform: translate(-50%, -50%); width: 112px; padding: 10px; border: 1px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--soft); text-align: center; }.system-node.core { background: var(--acid); }.system-node strong { display: block; font-size: 10px; }.system-node small { display: block; margin-top: 3px; color: var(--muted); font: 8px ui-monospace, monospace; }
.rule-table { width: 100%; border-collapse: collapse; }.rule-table th { text-align: left; color: var(--muted); font-size: 8px; text-transform: uppercase; padding: 7px; }.rule-table td { font-size: 9px; padding: 9px 7px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }.rule-table td:first-child { font-family: ui-monospace, monospace; color: var(--coral); }
.code-toolbar { padding: 10px 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); font: 10px ui-monospace, monospace; }.code-toolbar button { border: 0; background: none; cursor: pointer; color: var(--violet); }
#jsonEditor { display: block; width: 100%; min-height: 840px; padding: 18px; border: 0; resize: vertical; outline: none; background: #20221f; color: #d8ff78; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }.schema-panel #applyJsonBtn { border-width: 1px 0 0; }

.inspector-panel { position: sticky; top: calc(var(--top) + 14px); }
.text-btn { border: 0; background: transparent; cursor: pointer; color: var(--violet); font-size: 9px; }
.score-orbit { width: 150px; height: 150px; margin: 25px auto 13px; position: relative; }.score-orbit svg { transform: rotate(-90deg); }.score-orbit circle { fill: none; stroke: var(--soft); stroke-width: 5; }.score-orbit .progress { stroke: var(--acid); stroke-linecap: square; stroke-dasharray: 320; stroke-dashoffset: 25; transition: stroke-dashoffset .5s; }.score-orbit > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }.score-orbit strong { font-size: 34px; }.score-orbit small { font-size: 8px; color: var(--muted); letter-spacing: .1em; }
.check-list { padding: 0 18px 18px; }.check-item { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }.check-icon { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; background: var(--acid); flex: none; }.check-icon.warn { background: #ffd6ce; }.check-item strong, .check-item small { display: block; }.check-item strong { font-size: 10px; }.check-item small { color: var(--muted); margin-top: 3px; font-size: 8px; line-height: 1.4; }
.insight { margin: 0 18px 18px; background: #efecff; border-left: 3px solid var(--violet); padding: 12px; }.insight span { color: var(--violet); font-size: 8px; text-transform: uppercase; font-weight: 900; letter-spacing: .1em; }.insight p { margin: 6px 0 0; font-size: 10px; line-height: 1.6; }.inspector-panel > .full { border-width: 1px 0 0; }
.play-demo-btn { width: calc(100% - 36px); margin: 0 18px 18px; padding: 13px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--ink); background: var(--acid); text-align: left; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; }.play-demo-btn:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }.play-demo-btn > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: 9px; }.play-demo-btn strong,.play-demo-btn small { display:block; }.play-demo-btn strong { font-size: 11px; }.play-demo-btn small { margin-top:3px; font-size: 8px; opacity:.65; }
.free-demo-btn { width:calc(100% - 36px);margin:-7px 18px 18px;padding:12px;display:flex;align-items:center;gap:11px;border:1px solid var(--violet);background:#efecff;color:var(--ink);text-align:left;cursor:pointer; }.free-demo-btn>span { width:28px;height:28px;display:grid;place-items:center;background:var(--violet);color:white;font-weight:900; }.free-demo-btn strong,.free-demo-btn small{display:block}.free-demo-btn strong{font-size:11px}.free-demo-btn small{margin-top:3px;color:#6f6b80;font-size:8px}.free-demo-btn:hover{box-shadow:inset 3px 0 0 var(--violet)}
.version-panel { margin:0 18px 18px; padding:11px; border:1px solid var(--line); background:#f4f2ec; }.version-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }.version-head span { font-size:9px; font-weight:850; letter-spacing:.08em; }.version-head button { border:0; background:transparent; color:var(--violet); font-size:8px; cursor:pointer; }.version-list { display:grid; gap:5px; max-height:112px; overflow:auto; }.version-list > small { color:var(--muted); font-size:8px; line-height:1.5; }.version-item { display:flex; align-items:center; gap:7px; width:100%; padding:6px 7px; border:1px solid transparent; background:white; cursor:pointer; text-align:left; }.version-item.active { border-color:var(--violet); }.version-item b { font:9px ui-monospace,monospace; color:var(--violet); }.version-item span { min-width:0; flex:1; font-size:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.version-item em { font-style:normal; color:var(--muted); font-size:7px; }.version-item.best::after { content:'BEST'; color:#5b9300; font:7px ui-monospace,monospace; }
.trace-panel { margin-top:18px; }.trace-content { padding:16px; overflow:auto; }.trace-table { width:100%; border-collapse:collapse; }.trace-table th { padding:8px; color:var(--muted); font-size:8px; text-align:left; text-transform:uppercase; letter-spacing:.08em; }.trace-table td { padding:10px 8px; border-top:1px solid var(--line); font-size:9px; line-height:1.55; vertical-align:top; }.trace-status { display:inline-block; min-width:58px; padding:4px 6px; text-align:center; font:7px ui-monospace,monospace; }.trace-status.full { background:#dcf6b6;color:#3d6200}.trace-status.partial { background:#fff0b8;color:#745800}.trace-status.alternative { background:#e6e0ff;color:#5643af}.trace-status.unsupported { background:#ffd9d2;color:#942f23}.empty-state { padding:26px; color:var(--muted); font-size:10px; text-align:center; }

.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }.template-card { min-height: 360px; border: 1px solid var(--ink); padding: 22px; display: flex; flex-direction: column; box-shadow: 7px 7px 0 var(--ink); }.template-card > span { font: 10px ui-monospace, monospace; }.template-symbol { font-size: 64px; margin: auto; }.template-card h3 { font-size: 25px; margin: 0 0 8px; }.template-card p { font-size: 12px; line-height: 1.6; margin: 0 0 20px; }.template-card button { border: 0; border-top: 1px solid rgba(0,0,0,.25); background: transparent; padding: 15px 0 0; text-align: left; cursor: pointer; font-weight: 800; }.template-card.coral { background: #ff8772; }.template-card.lime { background: var(--acid); }.template-card.violet { background: #aa9cff; }
.evaluation-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 36px; }.metric-card { padding: 18px; min-height: 260px; border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; }.metric-card span { font: 9px ui-monospace, monospace; color: var(--muted); }.metric-card strong { font-size: 36px; margin: auto 0 4px; }.metric-card h3 { margin: 0 0 10px; font-size: 14px; }.metric-card p { color: var(--muted); font-size: 10px; line-height: 1.6; }.metric-bar { height: 5px; background: var(--soft); }.metric-bar i { height: 100%; display: block; background: var(--coral); }
.toast { position: fixed; right: 22px; bottom: 22px; padding: 12px 16px; color: white; background: var(--ink); font-size: 11px; transform: translateY(80px); opacity: 0; transition: .25s; z-index: 30; }.toast.show { transform: translateY(0); opacity: 1; }

.demo-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(14,15,13,.76); backdrop-filter: blur(12px); }.demo-modal.open { display: flex; animation: fadeIn .25s ease; }.demo-shell { width: min(1240px,96vw); height: min(780px,94vh); background: #171817; color: #f4f2ea; border: 1px solid #4b4d47; box-shadow: 0 34px 90px rgba(0,0,0,.45); overflow: hidden; }.demo-header { height: 66px; padding: 0 18px 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #3a3c37; }.demo-header > div { display: flex; align-items: center; gap: 11px; }.demo-header small,.demo-header strong { display: block; }.demo-header small { color: #85877f; font: 8px ui-monospace,monospace; letter-spacing:.15em; margin-bottom:4px; }.demo-header strong { font-size: 13px; }.demo-header > div:last-child > span { color:#898b84; font:9px ui-monospace,monospace; }.demo-header button { border:1px solid #464842; background:transparent; color:white; width:32px; height:32px; cursor:pointer; font-size:20px; }.live-dot { width:8px; height:8px; border-radius:50%; background:var(--acid); box-shadow:0 0 0 5px rgba(217,255,67,.1); }
.demo-loading { height: calc(100% - 66px); display: grid; place-content: center; text-align:center; }.loader-mark { width:72px; height:72px; margin:0 auto 22px; display:grid; place-items:center; background:var(--acid); color:#171817; font-weight:950; transform:rotate(-4deg); animation:pulseMark 1.1s ease-in-out infinite alternate; }.demo-loading h3 { margin:0 0 8px; font-size:24px; letter-spacing:-.03em; }.demo-loading p { color:#888b83; font-size:11px; }.loading-line { width:260px; height:2px; margin:24px auto 0; overflow:hidden; background:#353732; }.loading-line i { display:block; width:40%; height:100%; background:var(--acid); animation:loading 1.25s infinite ease-in-out; }
@keyframes fadeIn { from {opacity:0} } @keyframes pulseMark { to {transform:rotate(2deg) scale(1.06)} } @keyframes loading { from {transform:translateX(-100%)} to {transform:translateX(250%)} }
.demo-content { height: calc(100% - 66px); display:none; grid-template-columns:minmax(0,1fr) 270px; }.demo-content.ready { display:grid; }.game-stage { position:relative; min-width:0; background:#20221f; overflow:hidden; }.game-hud { position:absolute; z-index:3; top:16px; left:16px; display:flex; border:1px solid rgba(255,255,255,.15); background:rgba(18,19,17,.86); backdrop-filter:blur(6px); }.game-hud div { min-width:77px; padding:9px 12px; border-right:1px solid rgba(255,255,255,.12); }.game-hud div:last-child { border:0; }.game-hud small,.game-hud strong { display:block; }.game-hud small { color:#8c8f87; font-size:7px; text-transform:uppercase; letter-spacing:.1em; }.game-hud strong { margin-top:3px; font:15px ui-monospace,monospace; }
#gameCanvas { display:block; width:100%; height:100%; cursor:crosshair; }.game-overlay { position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; background:rgba(20,21,19,.72); backdrop-filter:blur(5px); }.game-overlay.hidden { display:none; }.game-overlay span { color:var(--acid); font:8px ui-monospace,monospace; letter-spacing:.2em; }.game-overlay h3 { font-size:30px; margin:12px 0 7px; }.game-overlay p { max-width:390px; color:#a2a49d; font-size:11px; line-height:1.7; }.game-overlay button { margin-top:15px; padding:12px 25px; border:1px solid var(--acid); background:var(--acid); color:#171817; font-weight:850; cursor:pointer; }
.demo-controls { padding:20px; border-left:1px solid #3a3c37; background:#1c1e1b; overflow:auto; }.demo-controls small { color:#797c74; font:8px ui-monospace,monospace; letter-spacing:.14em; }.demo-brief { padding-bottom:15px; border-bottom:1px solid #353732; }.demo-brief p { margin:8px 0 0; font-size:11px; line-height:1.6; }.tower-picker { margin:16px 0; display:grid; gap:8px; }.tower-option { width:100%; display:grid; grid-template-columns:35px 1fr auto; gap:9px; align-items:center; padding:9px; border:1px solid #3c3e39; background:#242622; color:white; cursor:pointer; text-align:left; }.tower-option.selected { border-color:var(--tower-color); box-shadow:inset 3px 0 0 var(--tower-color); }.tower-gem { width:29px; height:29px; display:grid; place-items:center; color:#171817; background:var(--tower-color); clip-path:polygon(50% 0,100% 28%,82% 100%,18% 100%,0 28%); font-size:10px; font-weight:900; }.tower-option strong,.tower-option small { display:block; }.tower-option strong { font-size:10px; }.tower-option small { margin-top:3px; font-size:7px; color:#85877f; }.tower-option b { color:var(--acid); font:10px ui-monospace,monospace; }.tower-option:disabled { opacity:.4; cursor:not-allowed; }
.demo-instructions { padding-top:14px; border-top:1px solid #353732; }.demo-instructions ol { margin:9px 0 16px; padding-left:18px; color:#a0a29b; font-size:9px; line-height:1.7; }.wave-btn,.ghost-btn { width:100%; padding:12px; cursor:pointer; }.wave-btn { display:flex; justify-content:space-between; border:1px solid var(--acid); background:var(--acid); color:#171817; font-weight:850; }.wave-btn:disabled { opacity:.35; cursor:not-allowed; }.ghost-btn { margin-top:8px; border:1px solid #454740; background:transparent; color:#bcbeb7; font-size:9px; }.playtest-note { margin-top:16px; padding:11px; border-left:2px solid var(--violet); background:#282634; }.playtest-note span { color:#a99cff; font-size:8px; font-weight:800; }.playtest-note p { margin:5px 0 0; color:#aaa7ba; font-size:8px; line-height:1.5; }
.revision-box,.diagnosis-panel { margin-top:16px; padding:12px; border:1px solid #3c3e39; background:#20221f; }.revision-box textarea { display:block; width:100%; min-height:62px; margin:8px 0; padding:9px; resize:vertical; border:1px solid #42443f; background:#171817; color:#ecebe4; font-size:9px; line-height:1.5; outline:none; }.revision-box > button { width:100%; padding:9px; border:1px solid var(--violet); background:transparent; color:#b5aaff; font-size:9px; cursor:pointer; }.revision-preview { display:none; margin-top:9px; }.revision-preview.show { display:block; }.change-row { padding:7px 0; border-top:1px solid #363832; }.change-row code { color:#b5aaff; font-size:8px; }.change-row p { margin:4px 0 0; color:#a9aba4; font-size:8px; line-height:1.4; }.apply-change-btn { margin-top:8px!important; background:var(--violet)!important; color:white!important; }.diagnosis-panel > p { color:#93968e; font-size:8px; line-height:1.55; }.diagnosis-score { display:flex; align-items:end; gap:8px; margin:9px 0; }.diagnosis-score strong { font-size:28px; color:var(--acid); }.diagnosis-score span { padding-bottom:4px; font-size:8px; color:#a5a79f; }.finding { margin-top:7px; padding-left:7px; border-left:2px solid #777; }.finding.good{border-color:var(--acid)}.finding.warning{border-color:#ffcf4d}.finding.critical{border-color:var(--coral)}.finding b,.finding small{display:block}.finding b{font-size:8px}.finding small{margin-top:3px;color:#92958d;font-size:7px;line-height:1.45}
.mini-modal { position:fixed; inset:0; z-index:120; display:none; place-items:center; padding:20px; background:rgba(18,19,17,.68); backdrop-filter:blur(8px); }.mini-modal.open { display:grid; }.mini-dialog { width:min(690px,94vw); max-height:88vh; overflow:auto; padding:24px; background:var(--paper); color:var(--ink); border:1px solid var(--ink); box-shadow:10px 10px 0 var(--ink); }.mini-dialog-head { display:flex; align-items:start; justify-content:space-between; }.mini-dialog-head small { color:var(--violet); font:8px ui-monospace,monospace; letter-spacing:.14em; }.mini-dialog-head h3 { margin:6px 0 0; font-size:24px; letter-spacing:-.03em; }.mini-dialog-head button { width:30px;height:30px;border:1px solid var(--line);background:transparent;cursor:pointer;font-size:18px}.mini-dialog>p { color:var(--muted);font-size:10px;line-height:1.6}.clarify-questions{display:grid;gap:12px;margin:20px 0}.clarify-card{padding:14px;border:1px solid var(--line);background:white}.clarify-card>strong{font-size:11px}.clarify-card>small{display:block;margin-top:4px;color:var(--muted);font-size:8px}.option-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.option-choice{padding:9px;border:1px solid var(--line);background:var(--paper);font-size:9px;cursor:pointer;text-align:left}.option-choice.selected{border-color:var(--violet);box-shadow:inset 3px 0 0 var(--violet)}.option-choice em{display:block;margin-top:3px;color:#6e5bd4;font-size:7px;font-style:normal}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}.dialog-actions .ghost-btn{width:auto;margin:0;color:var(--ink);border-color:var(--line)}.dialog-actions .primary{padding:11px 15px}.compare-dialog{width:min(860px,95vw)}.compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.compare-card{padding:16px;border:1px solid var(--line);background:white}.compare-card h4{margin:0 0 12px}.compare-stat{display:flex;justify-content:space-between;padding:8px 0;border-top:1px solid var(--line);font-size:9px}.compare-stat strong{font-family:ui-monospace,monospace}.compare-actions{margin-top:15px;display:flex;gap:8px}.compare-actions button{flex:1;padding:9px;border:1px solid var(--ink);background:transparent;cursor:pointer;font-size:9px}

.free-demo-modal{position:fixed;inset:0;z-index:130;display:none;place-items:center;padding:20px;background:rgba(10,11,10,.84);backdrop-filter:blur(10px)}.free-demo-modal.open{display:grid}.free-demo-shell{width:min(1320px,97vw);height:min(820px,95vh);overflow:hidden;background:#151614;color:#f3f1ea;border:1px solid #41433e;box-shadow:0 36px 100px rgba(0,0,0,.55)}.free-demo-header{height:66px;padding:0 18px 0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #363833}.free-demo-header>div{display:flex;align-items:center;gap:11px}.free-demo-header small,.free-demo-header strong{display:block}.free-demo-header small{margin-bottom:4px;color:#777a72;font:8px ui-monospace,monospace;letter-spacing:.13em}.free-demo-header strong{font-size:13px}.free-demo-header>div:last-child>span{color:#8d9088;font:9px ui-monospace,monospace}.free-demo-header button{width:32px;height:32px;border:1px solid #41433e;background:transparent;color:white;font-size:20px;cursor:pointer}.beta-badge{padding:7px 8px;background:var(--violet);color:white;font:8px ui-monospace,monospace;letter-spacing:.1em}.free-demo-layout{height:calc(100% - 66px);display:grid;grid-template-columns:minmax(0,1fr) 285px}.free-stage{position:relative;min-width:0;background:#0d0e0d}.free-stage iframe{display:none;width:100%;height:100%;border:0;background:#111}.free-stage iframe.ready{display:block}.free-loading{position:absolute;inset:0;z-index:3;display:grid;place-content:center;text-align:center;background:#111310}.free-loading.hidden{display:none}.free-loading h3{margin:0 0 7px;font-size:24px}.free-loading p{margin:0;color:#85887f;font-size:10px}.free-error-overlay{position:absolute;inset:0;z-index:4;display:none;place-content:center;text-align:center;background:rgba(20,16,18,.92)}.free-error-overlay.show{display:grid}.free-error-overlay span{color:var(--coral);font:8px ui-monospace,monospace;letter-spacing:.15em}.free-error-overlay h3{margin:10px 0 5px}.free-error-overlay p{max-width:520px;color:#aaa7a5;font-size:10px;line-height:1.6}.free-error-overlay button{justify-self:center;margin-top:12px;padding:11px 18px;border:1px solid var(--coral);background:var(--coral);color:#171817;font-weight:800;cursor:pointer}.free-sidebar{padding:18px;border-left:1px solid #363833;background:#1a1c19;overflow:auto}.free-sidebar small{color:#7c7f77;font:8px ui-monospace,monospace;letter-spacing:.13em}.free-meta{padding-bottom:13px;border-bottom:1px solid #343630}.free-meta>div{display:flex;align-items:end;justify-content:space-between;margin-top:7px}.free-meta strong{font-size:13px}.free-meta span{color:var(--acid);font:11px ui-monospace,monospace}.free-section{padding:13px 0;border-bottom:1px solid #343630}.free-section ol,.free-section ul{margin:8px 0 0;padding-left:18px;color:#a4a69f;font-size:8px;line-height:1.65}.free-section select{width:100%;margin-top:8px;padding:8px;border:1px solid #3e403b;background:#151614;color:white;font-size:9px}.free-runtime-log{padding:13px 0}.free-runtime-log p{display:flex;align-items:center;gap:7px;margin:7px 0;color:#a4a69f;font-size:8px}.free-runtime-log i{width:7px;height:7px;border-radius:50%;background:#777}.free-runtime-log i.ok{background:#7ecb38}.free-runtime-log i.error{background:var(--coral)}.free-runtime-log i.waiting{background:#ffcf4d;animation:pulseMark .7s alternate infinite}.free-edit{padding:12px;background:#24232d;border-left:2px solid var(--violet)}.free-edit textarea{display:block;width:100%;min-height:62px;margin:8px 0;padding:8px;border:1px solid #454253;background:#17161d;color:white;resize:vertical;font-size:9px;line-height:1.5}.free-edit button,.free-ghost-btn{width:100%;padding:10px;cursor:pointer;font-size:9px}.free-edit button{border:1px solid var(--violet);background:var(--violet);color:white}.free-ghost-btn{margin-top:9px;border:1px solid #444640;background:transparent;color:#afb1aa}

body.dark { --bg:#171817; --paper:#20221f; --ink:#f0eee7; --muted:#aaa89f; --line:#3b3d38; --soft:#30322e; --shadow:none; }.dark .sidebar { background:#1c1e1b; }.dark .topbar { background:rgba(32,34,31,.92); }.dark .brand-mark,.dark .step { background:var(--acid); color:#171817; }.dark .nav-item.active { background:var(--acid); color:#171817; }.dark .field,.dark .entity-card,.dark .loop-item,.dark .prompt-box { background:#242622; }.dark .prompt-box textarea,.dark .field input { color:var(--ink); }.dark .status-pill { background:#242622; }.dark .primary { background:var(--acid); color:#171817; }.dark .system-node { background:#242622; }.dark .system-node.core { color:#171817; background:var(--acid); }.dark .metric-card { background:var(--paper); }

@media (max-width: 1050px) { .workspace-grid { grid-template-columns: 1fr; }.inspector-panel { position: static; }.evaluation-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 760px) { :root { --sidebar:0px; }.sidebar { display:none; }.topbar { padding:0 14px; }.brand > span:last-child,.status-pill,.primary.small { display:none; } main { padding:32px 14px 60px; }.hero-row { align-items:flex-start; }.hero-note { display:none; }.panel-head { align-items:flex-start; padding:14px; min-height:auto; }.example-menu { display:none!important; }.prompt-bottom { flex-wrap:wrap; padding:8px; }.generate-btn { width:100%; min-height:46px; justify-content:center; border:1px solid var(--ink); }.entity-grid,.template-grid,.evaluation-grid { grid-template-columns:1fr; }.meta-grid { grid-template-columns:1fr; }.field.wide { grid-column:auto; }.loop { align-items:stretch; }.loop-arrow { display:grid; place-items:center; }.template-card { min-height:280px; }.demo-modal{padding:0}.demo-shell{width:100vw;height:100vh}.demo-content.ready{grid-template-columns:1fr;grid-template-rows:58vh 1fr}.demo-controls{border-left:0;border-top:1px solid #3a3c37}.game-hud div{min-width:60px;padding:7px}.demo-header>div:last-child>span{display:none}.free-demo-modal{padding:0}.free-demo-shell{width:100vw;height:100vh}.free-demo-layout{grid-template-columns:1fr;grid-template-rows:60vh 1fr}.free-sidebar{border-left:0;border-top:1px solid #363833}.free-demo-header>div:last-child>span{display:none}.option-grid,.compare-grid{grid-template-columns:1fr} }
