@font-face{font-family:"Geist";src:url(fonts/Geist-Variable.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Red Hat Text";src:url(fonts/RedHatText-Variable.woff2) format("woff2");font-weight:300 700;font-display:swap}
@font-face{font-family:"Red Hat Mono";src:url(fonts/RedHatMono-Variable.woff2) format("woff2");font-weight:300 700;font-display:swap}

:root{
  --ink:#101216; --white:#ffffff; --panel:#f4f5f7; --dim:rgba(255,255,255,.6); --faint:rgba(255,255,255,.38);
  --line:rgba(255,255,255,.1); --tint:rgba(255,255,255,.045); --tint2:rgba(255,255,255,.08);
  --claude:#f2c14e; --gpt:#ec6a58;
  --sans:"Geist",system-ui,sans-serif; --title:"Red Hat Text",system-ui,sans-serif; --mono:"Red Hat Mono",ui-monospace,monospace;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--ink);color:var(--white);font:400 12px/1.4 var(--sans);overflow:hidden;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
a{color:inherit}
.num{font-variant-numeric:tabular-nums}
.dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex:none}
.claude .dot,.dot.claude{background:var(--claude)}
.gpt .dot,.dot.gpt{background:var(--gpt)}
[hidden]{display:none!important}

#stage{position:fixed;inset:0;background:var(--ink)}
.frame{position:absolute;left:0;top:0;width:960px;height:540px;transform-origin:0 0;background:var(--ink);
  display:grid;grid-template-columns:666px 294px;grid-template-rows:30px 464px 46px;
  grid-template-areas:"bar side" "map side" "code side"}

.icon{width:24px;height:24px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;flex:none;color:var(--white)}
.icon::before{content:"";width:14px;height:14px;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
.icon:hover{background:var(--tint2)}
.icon:focus-visible,.speeds button:focus-visible,.games button:focus-visible{outline:1px solid var(--white);outline-offset:1px}
.play{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 1.5v11l9.5-5.5z'/%3E%3C/svg%3E")}
.play.on{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 1.5h3v11H3zM8 1.5h3v11H8z'/%3E%3C/svg%3E")}
.zin{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M7 2v10M2 7h10'/%3E%3C/svg%3E")}
.zout{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M2 7h10'/%3E%3C/svg%3E")}
.whole{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.5'%3E%3Crect x='1.5' y='3' width='11' height='8' rx='1'/%3E%3Cpath d='M4.5 7h5'/%3E%3C/svg%3E")}
.follow{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.5'%3E%3Ccircle cx='7' cy='7' r='4.2'/%3E%3Cpath d='M7 .5v3M7 10.5v3M.5 7h3M10.5 7h3'/%3E%3C/svg%3E")}
.follow[aria-pressed="true"]{background:var(--panel);color:var(--ink)}
.back{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M9 2.5 4.5 7 9 11.5'/%3E%3C/svg%3E");margin-left:-4px}

.bar{grid-area:bar;display:flex;align-items:center;gap:10px;padding:0 8px 0 10px;border-bottom:1px solid var(--line);min-width:0}
.games{display:flex;align-items:center;gap:2px;font-family:var(--title);font-weight:600}
.games .label{color:var(--dim);margin-right:5px;font-size:12px}
.games button{position:relative;width:20px;height:22px;border-radius:5px;font-size:12px;color:var(--dim)}
.games button:hover{background:var(--tint2);color:var(--white)}
.games button.on{background:var(--panel);color:var(--ink)}
.games button i{position:absolute;left:50%;bottom:2px;width:4px;height:2px;margin-left:-2px;border-radius:1px}
.transport{display:flex;align-items:center;gap:6px}
.speeds{display:flex;gap:1px;padding:2px;border-radius:7px;background:var(--tint)}
.speeds button{height:20px;padding:0 4px;border-radius:5px;font:500 10.5px var(--mono);color:var(--dim)}
.speeds button:hover{color:var(--white)}
.speeds button.on{background:var(--tint2);color:var(--white)}
.clock{font:500 12.5px var(--mono);white-space:nowrap;color:var(--white)}
.clock span{color:var(--faint);font-size:11px}
.cores{display:flex;align-items:center;gap:7px;margin-left:auto;font-size:11px}
.cores .k{color:var(--dim)}
.core{display:flex;align-items:center;gap:5px}
.core b{font:500 12px var(--mono);min-width:36px;text-align:right}
.core.hit b{color:var(--gpt)}
.core.claude.hit b{color:var(--claude)}

.map-pane{grid-area:map;position:relative;overflow:hidden;background:var(--ink)}
#map{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab}
#map.drag{cursor:grabbing}
.map-ctl{position:absolute;right:6px;top:6px;display:flex;flex-direction:column;gap:3px}
.map-ctl .icon{background:rgba(16,18,22,.82)}
.map-ctl .icon:hover{background:rgba(40,43,50,.92)}
.close{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M3 3l8 8M11 3l-8 8'/%3E%3C/svg%3E")}
.pill{position:absolute;bottom:8px;display:flex;align-items:center;gap:6px;height:24px;padding:0 10px 0 8px;border-radius:12px;white-space:nowrap;
  background:rgba(16,18,22,.86);border:1px solid var(--line);font:600 11px var(--title);color:var(--white);z-index:3}
.pill::before{content:"";width:12px;height:12px;flex:none;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
.pill:hover{background:var(--panel);color:var(--ink);border-color:var(--panel)}
.pill:focus-visible{outline:1px solid var(--white);outline-offset:1px}
.story-open{left:8px;--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.5'%3E%3Crect x='2' y='1.5' width='10' height='11' rx='1.5'/%3E%3Cpath d='M4.5 5h5M4.5 7.5h5M4.5 10h3'/%3E%3C/svg%3E")}
.story-open[aria-expanded="true"]{visibility:hidden}
.expand{right:8px;--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M1.5 5V1.5H5M9 1.5h3.5V5M12.5 9v3.5H9M5 12.5H1.5V9'/%3E%3C/svg%3E")}
.expand.collapse{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M5 1.5V5H1.5M12.5 5H9V1.5M9 12.5V9h3.5M1.5 9H5v3.5'/%3E%3C/svg%3E")}
.story{position:absolute;left:14px;right:14px;top:14px;bottom:0;z-index:4;display:flex;flex-direction:column;min-height:0;
  background:var(--ink);border:1px solid rgba(255,255,255,.14);border-bottom:0;border-radius:10px 10px 0 0;box-shadow:0 -6px 28px rgba(0,0,0,.5);animation:rise .22s ease-out}
@keyframes rise{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
.story-head{display:flex;align-items:center;gap:8px;height:34px;padding:0 6px 0 14px;border-bottom:1px solid var(--line);flex:none}
.story-games{display:flex;align-items:center;gap:2px;font:600 12px var(--title)}
.story-games .label{color:var(--dim);margin-right:5px}
.story-games button{width:20px;height:22px;border-radius:5px;color:var(--dim)}
.story-games button:hover{background:var(--tint2);color:var(--white)}
.story-games button.on{background:var(--panel);color:var(--ink)}
.story-head .close{margin-left:auto}
.story-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 28px 28px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.story-body>*{max-width:600px;margin-left:auto;margin-right:auto}
.story-body h1{font:600 21px/1.25 var(--title);margin:4px auto 2px}
.story-body .sub{color:var(--dim);margin-top:0;margin-bottom:14px;font-size:12.5px}
.story-body h2{font:600 14px/1.3 var(--title);margin:18px auto 6px}
.story-body p{font-size:12.5px;line-height:1.58;margin-top:0;margin-bottom:9px;color:rgba(255,255,255,.88);overflow-wrap:anywhere}
.story-body .quote{color:var(--white)}
.agent-link{font-weight:600;text-decoration:none;border-radius:4px;padding:0 3px;white-space:nowrap}
.agent-link.claude{color:var(--claude);background:rgba(242,193,78,.1)}
.agent-link.gpt{color:var(--gpt);background:rgba(236,106,88,.12)}
.agent-link:hover{text-decoration:underline}
.map-status{position:absolute;left:8px;top:8px;padding:2px 7px;border-radius:5px;background:rgba(16,18,22,.85);color:var(--dim);font-size:11px}

.side{grid-area:side;display:flex;flex-direction:column;min-height:0;min-width:0;border-left:1px solid var(--line)}
.tabs{display:flex;height:30px;flex:none;border-bottom:1px solid var(--line)}
.tabs button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;font:600 12px var(--title);color:var(--dim);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs button:hover{color:var(--white)}
.tabs button[aria-selected="true"]{color:var(--white);border-bottom-color:var(--white)}
.tabs button:focus-visible{outline:1px solid var(--white);outline-offset:-3px}
.agents-tab{flex:1;min-height:0;display:flex;flex-direction:column}
.agent{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}
.agent-head{display:flex;align-items:center;gap:7px;height:30px;padding:0 6px 0 6px;border-bottom:1px solid var(--line);flex:none}
.agent-name{font:600 13px var(--title);white-space:nowrap}
.agent-model{color:var(--dim);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.steps{position:relative;flex:1;min-height:0;overflow-y:auto;overflow-anchor:none;overscroll-behavior:contain;padding:4px 0 8px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.step{position:relative;padding:5px 10px 6px 12px;border-left:2px solid transparent;cursor:pointer}
.step:hover{background:var(--tint)}
.step.now{background:var(--tint2);border-left-color:var(--accent)}
.step-t{font:500 10.5px var(--mono);color:var(--faint);display:flex;gap:6px}
.step-t .calls{color:var(--faint)}
.reason{color:var(--dim);margin-top:2px;white-space:pre-wrap;overflow-wrap:anywhere}
.message{margin-top:2px;white-space:pre-wrap;overflow-wrap:anywhere}
.call{margin-top:4px;border-radius:5px;background:rgba(255,255,255,.05);overflow:hidden}
.call-name{display:flex;justify-content:space-between;gap:6px;padding:3px 7px 0;font:500 10.5px var(--mono);color:var(--dim)}
pre{margin:0;padding:3px 7px 5px;font:400 10.5px/1.4 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere;color:rgba(255,255,255,.88)}
.out{border-top:1px solid var(--line)}
.out pre{color:var(--dim)}
.clip{max-height:72px;overflow:hidden}
.more{display:block;width:100%;text-align:left;padding:1px 7px 4px;font:500 10.5px var(--mono);color:var(--faint)}
.more:hover{color:var(--white)}
.wake{padding:3px 12px;color:var(--faint);font:500 10.5px var(--mono);border-left:2px solid transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.wake.now{border-left-color:var(--accent);color:var(--dim)}
.empty{padding:14px 12px;color:var(--faint)}

.chat{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}
.live{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);display:flex;align-items:center;gap:5px;height:26px;padding:0 11px 0 8px;border-radius:13px;
  background:var(--panel);color:var(--ink);font:600 11.5px var(--title);box-shadow:0 2px 10px rgba(0,0,0,.45);z-index:2}
.live::before{content:"";width:12px;height:12px;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat;
  --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M7 2v9M2.8 7 7 11.2 11.2 7'/%3E%3C/svg%3E")}
.live b{min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--ink);color:var(--white);font:600 10px/16px var(--mono);text-align:center}
.live:hover{background:var(--white)}
.chat-feed{flex:1;min-height:0;overflow-y:auto;overflow-anchor:none;overscroll-behavior:contain;padding:4px 10px 6px;scrollbar-width:thin;scrollbar-color:var(--line) transparent;font-size:11px;line-height:1.32}
.msg{display:grid;grid-template-columns:30px 1fr;gap:5px;padding:2px 0}
.msg .when{font:500 9.5px/1.45 var(--mono);color:var(--faint)}
.msg .body{overflow-wrap:anywhere;min-width:0;color:rgba(255,255,255,.86)}
.msg .who{font-weight:600;white-space:nowrap;cursor:pointer;margin-right:5px}
.claude .who{color:var(--claude)} .gpt .who{color:var(--gpt)}
.msg .who:hover{text-decoration:underline}
.msg .to{color:var(--faint)}
.msg.fresh{animation:fresh .5s ease-out}
@keyframes fresh{from{background:var(--tint2)}to{background:transparent}}

.roster{flex:1;min-height:0;overflow-y:auto;padding:3px 6px 4px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.roster-head{display:flex;align-items:center;gap:6px;height:19px;padding:0 3px;font:600 11px var(--title);color:var(--dim)}
.roster-head .key{margin-left:auto;display:flex;gap:8px;font:500 9.5px var(--sans);color:var(--faint)}
.roster-head .key span{display:flex;align-items:center;gap:3px}
.roster-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px 1px;margin-bottom:3px}
.who-btn{display:flex;align-items:center;gap:4px;height:15px;padding:0 3px;border-radius:4px;font-size:10px;overflow:hidden;color:rgba(255,255,255,.82);white-space:nowrap;text-align:left}
.who-btn:hover{background:var(--tint2);color:var(--white)}
.who-btn.sel{background:var(--panel);color:var(--ink)}
.st{width:7px;height:7px;border-radius:50%;flex:none;box-shadow:inset 0 0 0 1px var(--c)}
.st.thinking{background:var(--c)}
.st.still{background:var(--c);opacity:.45}
.claude .st,.st.claude{--c:var(--claude)} .gpt .st,.st.gpt{--c:var(--gpt)}
.st.between{box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}

.barcode{grid-area:code;position:relative;border-top:1px solid var(--line)}
#barcode{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:col-resize;touch-action:none}

.foot{flex:none;height:18px;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:0 10px;font-size:10px;color:var(--faint);border-top:1px solid var(--line)}
.foot a{text-decoration:none}
.foot a:hover{color:var(--white)}

.poster{position:absolute;inset:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:var(--ink) url(poster.jpg) center/contain no-repeat;color:var(--white)}
.poster::before{content:"";position:absolute;inset:0;background:rgba(16,18,22,.55)}
.poster>*{position:relative}
.poster-title{font:600 17px var(--title)}
.poster-play{width:52px;height:52px;border-radius:50%;background:var(--panel);display:flex;align-items:center;justify-content:center}
.poster-play::before{content:"";width:18px;height:18px;margin-left:3px;background:var(--ink);-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat;
  --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 1v12l11-6z'/%3E%3C/svg%3E")}
.poster-sub{font-size:13px;color:var(--dim)}
.rotate .frame::after{content:"Rotate to landscape";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(16,18,22,.92);font:600 22px var(--title);z-index:5}
