/* Immersive workspace. The left edge, keyboard and touch all open the HUD. */
:root{--game-ink:#e1e8ed;--game-muted:#96a1ad;--game-glass:#10171ee8;--game-line:#ffffff16}
:root{--activity-height:112px}
.main-shell{padding-top:var(--activity-height)}
.activity-rail{position:fixed;top:0;left:14px;right:0;height:var(--activity-height);z-index:60;background:#101920f5;backdrop-filter:blur(20px);border-bottom:1px solid #34453e;padding:10px 22px;box-sizing:border-box}
.activity-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px;font-size:14px;color:#bed1cb}
.activity-head>strong{font-size:14px;font-weight:500}.activity-head>strong[data-state=running]{color:#9af1c9}
.activity-head details summary{cursor:pointer;font-size:14px}.activity-head details>div{position:absolute;right:20px;top:42px;max-width:540px;width:calc(100vw - 64px);max-height:65dvh;overflow:auto;padding:20px;background:#19242b;border:1px solid #46635a;border-radius:12px;box-shadow:0 14px 40px #0009;color:#d3ddd9;font-size:16px;line-height:1.6;z-index:3}.activity-head details p{margin:0 0 12px}.activity-head details li{margin-bottom:8px}
.activity-agents{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.activity-chip{display:grid;grid-template-columns:10px 1fr;gap:3px 8px;text-align:left;padding:8px 12px;min-width:0;background:#182129;border:1px solid #34414a;border-radius:10px;color:#b7c4cc;cursor:pointer;font-family:inherit}.activity-chip strong{font-size:16px}.activity-chip span{grid-column:2;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-chip i{width:8px;height:8px;border-radius:50%;background:#82909b;margin-top:6px}.activity-chip[data-state=running]{background:#173a2e;border-color:#589c7b;color:#c7fbe0}.activity-chip[data-state=running] i{background:#92f4bd;animation:activity-pulse 1.5s ease-in-out infinite}.activity-chip[data-state=waiting_for_approval]{border-color:#ca9a48;color:#ffda9b}.activity-chip[data-state=failed]{border-color:#ae5a64;color:#ffb7ba}.activity-chip[data-state=unknown]{opacity:.7}
@keyframes activity-pulse{50%{box-shadow:0 0 0 5px #8decb322}}
body.office-mode .game-shell{height:calc(100dvh - var(--activity-height));min-height:360px}
@media(max-width:620px){:root{--activity-height:174px}.activity-rail{padding:9px 10px}.activity-agents{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.activity-chip{padding:6px 9px}.activity-chip strong{font-size:14px}.activity-head{align-items:flex-start}.activity-head>strong{max-width:52%}.activity-head details summary{max-width:140px}.activity-head details>div{right:10px}body.office-mode .game-shell{min-height:300px}.game-bottom .room-list{display:none}.game-help{display:none}}
@media(prefers-reduced-motion:reduce){.activity-chip[data-state=running] i{animation:none}}
@media(max-height:600px){body.office-mode .game-shell{min-height:0}.game-help,.game-status p{display:none}.game-top{top:10px}.game-status{top:62px}.game-bottom{bottom:10px}.game-inspector{top:62px;max-height:calc(100% - 120px)}}
@media(max-width:360px){:root{--activity-height:188px}.activity-head>strong,.activity-head details summary{font-size:14px}.activity-chip span{font-size:14px}}
.main-shell{margin-left:14px;width:calc(100% - 14px)}
.sidebar{width:260px;transform:translateX(-100%);visibility:hidden;transition:transform .22s,visibility .22s;background:#10171cf5;backdrop-filter:blur(24px);box-shadow:20px 0 100px #0008;z-index:80}
.sidebar.open,.sidebar:focus-within{transform:translateX(0);visibility:visible}
.hud-edge{position:fixed;left:0;top:0;width:14px;height:100dvh;background:#152320;border:0;border-right:1px solid #547c6555;z-index:70;color:#9ce8c7;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;padding:0}
.hud-edge span{writing-mode:vertical-rl;font-size:8px;letter-spacing:3px}.hud-edge b{font-size:18px}.hud-edge:hover,.hud-edge:focus-visible{background:#2c5243;width:22px}
.mobile-menu{display:flex}.topbar{height:58px;background:#0e151bd9;padding:0 26px}.breadcrumb{font-size:12px}.topbar-actions{font-size:11px}
body.office-mode{overflow:hidden;background:#10141c}body.office-mode .topbar,body.office-mode footer{display:none}body.office-mode main{max-width:none;padding:0;margin:0}
.game-shell{position:relative;height:100dvh;min-height:460px;overflow:hidden;background:radial-gradient(ellipse at 45% 40%,#29313a,#10141a 75%);isolation:isolate}
.game-canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}.game-canvas:focus-visible{box-shadow:inset 0 0 0 2px #a4e7cb}
.game-top{position:absolute;top:24px;left:32px;right:28px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;pointer-events:none}.game-top>*{pointer-events:auto}
.game-wordmark{display:flex;gap:13px;align-items:center}.game-wordmark .brand-mark{background:#132720de;backdrop-filter:blur(10px);width:44px;height:44px}.game-wordmark strong{letter-spacing:.18em;font-size:19px}.game-wordmark small{display:block;margin-top:5px;color:#a8b7b9;font-size:10px;letter-spacing:.18em}
.game-nav{display:flex;gap:4px;padding:5px;background:var(--game-glass);border:1px solid var(--game-line);border-radius:14px;backdrop-filter:blur(15px)}.game-nav a,.game-nav button{font:12px inherit;padding:10px 15px;border-radius:9px;color:#bdcad0;border:0;background:none;cursor:pointer}.game-nav .active{background:#294039;color:#b2f0d5}
.game-status{position:absolute;top:89px;left:32px;font-size:11px;color:#a8b9bb;max-width:400px}.game-status strong{font-weight:500;color:#ace4ce}.game-status p{font-size:10px;line-height:1.5;margin-top:7px;max-width:330px;color:#a0aaac}
.game-bottom{position:absolute;left:28px;right:28px;bottom:22px;display:flex;gap:14px;align-items:flex-end;pointer-events:none}.game-bottom>*{pointer-events:auto}.game-bottom .room-list{display:flex;gap:7px;max-width:790px;width:100%}.game-bottom .room-summary{flex:1;border:1px solid #ffffff15;border-top:2px solid var(--room-color);background:#101920e8;backdrop-filter:blur(18px);border-radius:13px;padding:14px 17px;gap:5px;min-width:0}.game-bottom .room-summary.selected{background:#22372fe8!important}.game-bottom .room-summary strong{font-size:13px}.game-bottom .room-summary span{color:#99a8ad;font-size:10px}.game-bottom .room-summary small{font-size:10px}.game-controls{margin-left:auto;display:flex;gap:5px;background:var(--game-glass);border:1px solid var(--game-line);padding:7px;border-radius:13px}.game-controls button{width:34px;height:34px;border:0;background:transparent;color:#d0dfdd;border-radius:7px;font-size:16px;cursor:pointer}.game-controls button:hover{background:#293c39}
.game-inspector{display:block;position:absolute;top:94px;right:28px;width:264px;max-height:calc(100% - 230px);overflow:auto;padding:21px;background:var(--game-glass);backdrop-filter:blur(18px);border:1px solid var(--game-line);border-radius:18px;box-shadow:0 15px 50px #0004}.game-inspector h2{font-size:28px;margin:10px 0}.game-inspector p:not(.eyebrow){font-size:12px;line-height:1.7;color:#becbc9}.game-inspector .primary{font-size:11px;min-height:38px;margin:16px 0}.game-inspector .eyebrow{font-size:9px}.game-inspector details summary{font-size:10px}.game-inspector form{gap:12px}.game-inspector small{margin:12px 0}.inspector-close{float:right;border:0;background:transparent;color:#acb9bc;font-size:18px;cursor:pointer}.game-inspector.collapsed{display:none}.game-help{position:absolute;bottom:122px;left:32px;font-size:10px;color:#a4b1b6;background:#101820b8;padding:8px 12px;border-radius:8px;pointer-events:none}.game-loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#bed2cc;font-size:14px;text-align:center}.game-loading[hidden]{display:none}.game-enter{border:1px solid #587466;background:#193329;color:#b7edcf;padding:10px;border-radius:10px}
body.brain-mode{background:#101218}body.brain-mode main{max-width:none;padding:22px 25px}body.brain-mode footer{display:none}body.brain-mode .page-heading{margin-bottom:18px}body.brain-mode .page-heading h1{font-size:27px}body.brain-mode .page-heading p{font-size:12px}.brain-workbench{display:grid;grid-template-columns:260px minmax(0,1fr);border:1px solid #2b2e3a;border-radius:14px;background:#14161e;min-height:calc(100dvh - 195px);overflow:hidden}.brain-workbench .library-sidebar{background:#12141b;max-height:calc(100dvh - 195px);border-right:1px solid #2b2e3a;overflow:auto;padding:16px}.brain-workbench .library-sidebar input{background:#1b1d27;font-size:11px}.brain-workbench .library-sidebar>small{color:#9c91b5}.vault-heading{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1.3px;color:#ad9dcb;margin:2px 0 17px}.vault-folder{margin:8px 0}.vault-folder summary{color:#b8aecb;padding:10px 4px;font-size:11px}.vault-folder .list-item{padding:8px 9px 8px 17px;border-radius:5px}.vault-folder .list-item strong{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vault-folder .list-item small{font-size:9px;color:#747e8f}.vault-kind{margin:12px 0;width:100%;padding:8px;font-size:11px}.brain-main{min-width:0;position:relative;display:flex;flex-direction:column}.brain-main .brain-tabs{margin:0;padding:10px 15px;border-bottom:1px solid #2c2e3b;background:#171a22}.brain-main .brain-tabs .button{border:0;padding:8px 14px;min-height:33px;background:none;font-size:11px}.brain-main .brain-tabs .selected{background:#302940!important;color:#d8c0ff}.brain-main .library-layout{display:block;border:0;border-radius:0;min-height:0}.brain-main .document-reader{background:#161921;max-height:calc(100dvh - 254px);padding:30px}.brain-main .document-content{color:#bac3d0;font:12px/1.95 ui-monospace,monospace}.brain-main .document-meta{color:#b29bd1}.brain-main .notes-layout{padding:22px;grid-template-columns:190px 1fr;overflow:auto;max-height:calc(100dvh - 254px)}.brain-main .graph-toolbar{margin:0;padding:10px 16px;border-bottom:1px solid #ffffff0c;gap:12px;flex-wrap:wrap}.brain-main .graph-toolbar select{display:inline-block;padding:6px 9px;margin:0;font-size:10px;max-width:240px}.brain-main .graph-toolbar label{font-size:10px;display:flex;gap:9px;align-items:center}.brain-main .graph-toolbar small{font-size:10px;color:#a894be}.brain-stage{position:relative;height:calc(100dvh - 353px);min-height:380px}.brain-canvas{width:100%;height:100%;display:block;touch-action:none;outline:none;background:radial-gradient(ellipse at 50% 48%,#1d1c2b,#11131b 72%)}.brain-canvas:focus-visible{box-shadow:inset 0 0 0 2px #b99aea}.graph-tools{position:absolute;bottom:16px;right:16px;display:flex;gap:3px;background:#242231da;border:1px solid #4a405755;border-radius:10px;padding:4px}.graph-tools button{background:none;color:#d1c4ed;border:0;width:32px;height:30px;cursor:pointer}.graph-legend{position:absolute;top:18px;left:19px;display:flex;gap:15px;flex-wrap:wrap;color:#aca0b8;font-size:10px;pointer-events:none}.graph-legend span::before{content:'●';margin-right:5px}.graph-legend .skill{color:#c0a0ff}.graph-legend .loop{color:#f5c270}.graph-legend .document{color:#7db7e1}.graph-legend .fact{color:#87d2ad}.graph-caption{padding:11px 17px;margin:0;border-top:1px solid #ffffff0c;font-size:10px;color:#9291a9;line-height:1.5}.graph-tip{position:absolute;bottom:18px;left:20px;max-width:55%;font-size:11px;color:#d0bfdf;background:#171722dc;padding:9px 12px;border-radius:7px;pointer-events:none}.graph-open-source{position:absolute;top:48px;left:18px;border:1px solid #605273;background:#292339;color:#dfcef9;padding:8px 12px;border-radius:7px;font-size:11px;cursor:pointer;max-width:70%;text-align:left}
@media(max-width:950px){.game-inspector{width:245px;right:18px}.game-top{left:22px;right:18px}.game-nav a,.game-nav button{padding:9px}.game-bottom{left:18px;right:18px;bottom:17px;gap:8px}.game-bottom .room-summary{padding:12px 9px}.game-bottom .room-summary span{display:none}.game-status{left:22px}.game-help{left:22px;bottom:103px}.brain-workbench{grid-template-columns:210px minmax(0,1fr)}.game-controls button{width:27px}.brain-main .notes-layout{grid-template-columns:1fr}}
@media(max-width:620px){.breadcrumb strong{margin-left:.45rem}.game-top{top:17px}.game-wordmark strong{font-size:14px}.game-wordmark small{font-size:8px}.game-wordmark .brand-mark{width:35px;height:35px;font-size:21px}.game-nav a,.game-nav button{font-size:10px;padding:9px 7px}.game-nav .game-nav-secondary{display:none}.game-status{top:74px;max-width:240px}.game-status p{font-size:9px;max-width:245px}.game-bottom{flex-wrap:wrap}.game-bottom .room-list{order:2;gap:4px}.game-bottom .room-summary{padding:10px 7px}.game-bottom .room-summary strong{font-size:11px}.game-bottom .room-summary small{font-size:8px}.game-controls{margin-left:auto;padding:3px}.game-help{bottom:145px;font-size:9px;max-width:210px}.game-inspector{top:112px;right:15px;width:240px;max-height:calc(100% - 280px)}.game-inspector h2{font-size:22px}.brain-workbench{grid-template-columns:1fr}.brain-workbench .library-sidebar{max-height:210px;border-right:0;border-bottom:1px solid #2b2e3a}.brain-workbench .library-sidebar .item-list{max-height:90px;overflow:auto}.vault-heading{margin-bottom:10px}.brain-main .graph-toolbar{flex-direction:row;align-items:center}.brain-main .graph-toolbar label{max-width:100%}.brain-stage{height:58dvh;min-height:360px}body.brain-mode main{padding:17px 12px}.brain-main .notes-layout{padding:14px}.brain-main .document-reader{padding:20px}.game-shell{min-height:560px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}.chat-messages{scroll-behavior:auto}}
.graph-node-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:7px;margin:12px 0 0;max-height:220px;overflow:auto;padding:2px}.graph-node-choice{display:flex;flex-direction:column;gap:3px;min-width:0;padding:9px 11px;text-align:left;border:1px solid #302c3e;border-radius:8px;background:#171923;color:#bdb4cc;cursor:pointer;font:inherit}.graph-node-choice:hover,.graph-node-choice:focus-visible{border-color:#a98bd2;color:#f0e7ff;outline:2px solid #a98bd255;outline-offset:1px}.graph-node-choice.selected{background:#302940;border-color:#c0a0ff;color:#fff}.graph-node-choice strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.graph-node-choice small{color:#8e879d;font-size:9px}.graph-node-choice.selected small{color:#cbb9ea}
@media(max-width:620px) and (max-height:600px){.game-shell{min-height:0}.game-nav a{font-size:9px;padding:6px 5px}.game-wordmark small{display:none}.game-status{top:62px}.game-bottom{bottom:8px}.graph-node-list{max-height:160px;grid-template-columns:repeat(2,minmax(0,1fr))}}
