/* Mock panel */
body.panel { overflow: hidden; height: 100svh; background: var(--surface); }
.app { display: grid; grid-template-columns: 252px 1fr; height: 100svh; }
.ico { width: 16px; height: 16px; flex: none; }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 14px; padding: 14px 12px; border-right: 1px solid var(--line); background: #1b2440; min-height: 0; z-index: 30; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 2px; }
.side-top .brand { font-size: 15.5px; } .side-top .brand-mark { width: 22px; height: 22px; }
.switcher { position: relative; }
.switch-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.03); text-align: left; transition: background .2s, border-color .2s; }
.switch-btn:hover { background: rgba(var(--tint, 27, 36, 64),.06); border-color: var(--line-2); }
.srv-ico { width: 34px; height: 34px; border-radius: var(--r-ctl); display: grid; place-items: center; flex: none; color: #1b2440; font-weight: 700; font-size: 12px; background: var(--srv-grad, linear-gradient(135deg, #4f7cff, #ffcb3d)); }
.srv-ico.srv-logo { background: var(--surface); border: 1px solid var(--line); }
.menu .srv-ico.srv-logo { background: transparent; border: 0; }
.switch-btn b { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-btn small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.switch-btn .grow { flex: 1; min-width: 0; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.status-dot.off { background: #6b7590; } .status-dot.busy { background: var(--warn); } .status-dot.sleep { background: var(--lilac-ink, #6549c0); }
.menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; padding: 6px; border-radius: var(--r-box); background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -12px rgba(27,36,64,.16); display: grid; gap: 2px; animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu button { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-ctl); border: 0; background: transparent; text-align: left; font-size: 13.5px; color: var(--text-2); }
.menu button:hover, .menu button.on { background: rgba(var(--tint, 27, 36, 64),.06); color: var(--text); }
.menu .srv-ico { width: 26px; height: 26px; border-radius: var(--r-ctl); font-size: 10px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.nav-list { display: grid; gap: 1px; }
.nav-label { font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6b7590; padding: 10px 10px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--text-2); font-size: 14px; text-align: left; transition: background .15s, color .15s; width: 100%; }
.nav-item:hover { background: rgba(var(--tint, 27, 36, 64),.04); color: var(--text); }
.nav-item.on { background: rgba(var(--tint, 27, 36, 64),.07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav-item.on .ico { color: var(--accent-2); }
.nav-item .count { margin-left: auto; font: 500 11px var(--sans); color: var(--muted); }
.nav-item .new-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.usage { padding: 12px; border-radius: var(--r-box); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,203,61,.08), rgba(var(--tint, 27, 36, 64),.01)); font-size: 12.5px; display: grid; gap: 8px; }
.usage-row { display: flex; justify-content: space-between; color: var(--text-2); }
.usage-row b { color: var(--text); font-weight: 500; }
.meter { height: 5px; border-radius: var(--r-ctl); background: rgba(var(--tint, 27, 36, 64),.08); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .6s var(--ease); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-ctl); font-size: 13px; }
.avatar { width: 28px; height: 28px; border-radius: var(--r-ctl); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #1b2440; background: var(--c, linear-gradient(135deg, #38bdf8, #ffcb3d)); flex: none; }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); flex: none; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; }
.crumbs b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--faint, #c3cad8); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: var(--r-ctl); font-size: 12.5px; border: 1px solid rgba(61,220,151,.25); background: rgba(61,220,151,.08); color: var(--good); white-space: nowrap; }
.status-pill.off { color: var(--muted); border-color: var(--line); background: rgba(var(--tint, 27, 36, 64),.03); }
.status-pill.busy { color: var(--warn); border-color: rgba(255,194,75,.25); background: rgba(255,194,75,.08); }
.status-pill .dot { width: 7px; height: 7px; } .status-pill.off .dot { background: #6b7590; animation: none; } .status-pill.busy .dot { background: var(--warn); animation: none; }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; width: 300px; height: 36px; padding: 0 8px 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.03); color: var(--muted); font-size: 13.5px; transition: border-color .2s, background .2s; }
.search:hover { border-color: var(--line-2); background: rgba(var(--tint, 27, 36, 64),.05); }
.search span { flex: 1; text-align: left; }
.power { display: flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.power button { height: 34px; width: 36px; display: grid; place-items: center; border: 0; background: rgba(var(--tint, 27, 36, 64),.03); color: var(--text-2); transition: background .15s, color .15s; }
.power button + button { border-left: 1px solid var(--line); }
.power button:hover { background: rgba(var(--tint, 27, 36, 64),.08); color: var(--text); }
.burger { display: none; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.03); place-items: center; }
.views { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow: auto; display: none; animation: view-in .35s var(--ease); }
.view.on { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.view-pad { padding: 28px; max-width: 1180px; margin: 0 auto; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h1 { font-size: 26px; letter-spacing: -.035em; margin: 0; font-weight: 600; }
.view-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.panel-card { border: 1px solid var(--line); border-radius: var(--r-box); background: linear-gradient(180deg, rgba(var(--tint, 27, 36, 64),.03), rgba(var(--tint, 27, 36, 64),.01)); }
.panel-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.panel-card > header small { color: var(--muted); font-weight: 400; }

/* Assistant */
.assistant { display: none; grid-template-columns: minmax(0, 1fr) 300px; height: 100%; }
.view.on.assistant { display: grid; }
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.thread { flex: 1; overflow-y: auto; padding: 28px 28px 12px; scroll-behavior: smooth; }
.thread-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.welcome { text-align: center; padding: 40px 0 10px; display: grid; justify-items: center; gap: 10px; animation: view-in .6s var(--ease); }
.welcome-orb { width: 64px; height: 64px; border-radius: var(--r-box); background: var(--grad); display: grid; place-items: center; box-shadow: 0 0 60px rgba(46,230,214,.45), 0 0 0 1px rgba(27,36,64,.2) inset; animation: orb 6s ease-in-out infinite; }
@keyframes orb { 50% { transform: translateY(-4px) rotate(4deg); box-shadow: 0 0 80px rgba(255,203,61,.55), 0 0 0 1px rgba(27,36,64,.2) inset; } }
.welcome h2 { font-size: 26px; letter-spacing: -.035em; margin: 8px 0 0; font-weight: 600; }
.welcome p { color: var(--muted); margin: 0; max-width: 460px; }
.suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; width: 100%; }
.suggest button { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: var(--r-box); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.025); color: var(--text-2); font-size: 13.5px; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.suggest button:hover { border-color: rgba(255,203,61,.45); background: rgba(255,203,61,.06); color: var(--text); transform: translateY(-1px); }
.suggest button .ico { color: var(--accent-2); margin-top: 2px; }
.suggest small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.m { display: flex; gap: 12px; animation: msg-in .45s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); } }
.m.user { justify-content: flex-end; }
.m.user .bubble { background: #1b2440; color: #1b2440; padding: 10px 14px; border-radius: var(--r-box); max-width: 78%; font-size: 14.5px; }
.m.ai .body { flex: 1; min-width: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.m.ai .body p { margin: 0; } .m.ai .body b { color: var(--text); font-weight: 500; }
.ai-av { width: 28px; height: 28px; border-radius: var(--r-ctl); flex: none; display: grid; place-items: center; font: 700 10.5px/1 var(--sans); color: #1b2440; background: var(--grad); box-shadow: 0 0 18px rgba(46,230,214,.3); }
.ai-av.has-wisp { width: 32px; height: 32px; margin: -2px; background: none; box-shadow: none; }
.ai-av .wisp { width: 32px; height: 32px; }
.welcome-orb.has-wisp { width: 96px; height: 96px; background: none; box-shadow: none; animation: none; }
.welcome-orb .wisp { width: 96px; height: 96px; }
.thinking { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; }
.thinking .shim { background: linear-gradient(90deg, var(--muted) 0%, #fff 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shim 1.4s linear infinite; }
@keyframes shim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tool-trace { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-trace span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--r-ctl); font: 12px var(--mono); background: rgba(var(--tint, 27, 36, 64),.04); border: 1px solid var(--line); color: var(--muted); animation: msg-in .3s var(--ease); }
.tool-trace span .ok { color: var(--good); }

/* Plan card */
.plan-card { border: 1px solid var(--line-2); border-radius: var(--r-box); background: var(--surface); overflow: hidden; box-shadow: 0 20px 50px -24px rgba(27,36,64,.16); animation: msg-in .45s var(--ease); }
.plan-card.done { border-color: rgba(61,220,151,.3); }
.plan-card.cancelled { opacity: .55; }
.pc-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pc-head b { color: var(--text); font-weight: 500; font-size: 14.5px; }
.pc-head .badges { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.pc-items { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.pc-items li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-ctl); font-size: 14px; color: var(--text-2); transition: background .2s; }
.pc-items li:hover { background: rgba(var(--tint, 27, 36, 64),.025); }
.pc-items li b { color: var(--text); font-weight: 500; }
.pc-items .k { width: 28px; height: 28px; border-radius: var(--r-ctl); display: grid; place-items: center; flex: none; background: rgba(255,203,61,.1); border: 1px solid rgba(255,203,61,.22); color: var(--accent-2); }
.pc-items .k.store { background: rgba(79,124,255,.1); border-color: rgba(79,124,255,.25); color: var(--blue); }
.pc-items .k.discord { background: rgba(56,189,248,.08); border-color: rgba(56,189,248,.22); color: var(--cyan); }
.pc-items .k.warn { background: rgba(255,194,75,.08); border-color: rgba(255,194,75,.25); color: var(--warn); }
.pc-items .tag { margin-left: auto; font: 11.5px var(--sans); color: var(--muted); flex: none; }
.pc-items .state { margin-left: 4px; width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.pc-items li.run .state { border-radius: 50%; border: 2px solid rgba(var(--tint, 27, 36, 64),.12); border-top-color: var(--accent-2); animation: spin .7s linear infinite; }
.pc-items li.ok .state { border-radius: 50%; background: var(--good); }
.pc-items li.ok .state::after { content: ""; width: 7px; height: 4px; border: 2px solid #1b2440; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.pc-items li.ok { color: var(--text); }
.pc-detail { margin: 0 16px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: none; }
.pc-detail.open { display: block; animation: view-in .3s var(--ease); }
.pc-detail .fname { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.pc-detail pre { margin: 0; padding: 12px; font: 12.5px/1.65 var(--mono); color: var(--text-2); overflow-x: auto; }
.pc-detail .add { color: var(--good); } .pc-detail .del { color: var(--bad); }
.pc-items .add { color: var(--good); } .pc-items .del { color: var(--bad); }
.pc-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.015); flex-wrap: wrap; }
.pc-foot .note { font-size: 12.5px; color: var(--muted); margin-right: auto; display: flex; align-items: center; gap: 6px; }
.pc-foot .ok-note { color: var(--good); }
.link-btn { border: 0; background: none; color: var(--text-2); font-size: 13px; padding: 4px 6px; border-radius: var(--r-ctl); text-decoration: underline; text-decoration-color: rgba(var(--tint, 27, 36, 64),.2); text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); text-decoration-color: currentColor; }
.diag { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.diag div { padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.02); font-size: 12.5px; color: var(--muted); }
.diag b { display: block; font: 600 20px/1.2 var(--sans); color: var(--text); letter-spacing: -.02em; margin-top: 2px; }
.diag b.warn { color: var(--warn); } .diag b.good { color: var(--good); }
.refuse { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px solid rgba(255,107,107,.25); background: rgba(255,107,107,.05); font-size: 13.5px; }
.refuse .ico { color: var(--bad); margin-top: 3px; }

/* Composer */
.composer-wrap { padding: 10px 28px 20px; }
.composer { max-width: 760px; margin: 0 auto; position: relative; border-radius: var(--r-box); border: 1px solid var(--line-2); background: var(--surface); padding: 12px 12px 10px 16px; box-shadow: 0 20px 60px -20px rgba(27,36,64,.16); transition: border-color .2s, box-shadow .3s; }
.composer:focus-within { border-color: rgba(255,203,61,.6); box-shadow: 0 0 0 4px rgba(255,203,61,.12), 0 20px 60px -20px rgba(27,36,64,.16); }
.composer textarea { width: 100%; border: 0; outline: none; background: transparent; resize: none; font-size: 15px; line-height: 1.5; max-height: 160px; color: var(--text); }
.composer textarea::placeholder { color: #6b7590; }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.composer-bar .hint { font-size: 12px; color: #6b7590; display: flex; align-items: center; gap: 6px; margin-right: auto; }
.send { width: 34px; height: 34px; border-radius: var(--r-ctl); border: 0; background: var(--accent); color: var(--ink-fill, #1b2440); display: grid; place-items: center; transition: transform .2s var(--ease), opacity .2s; }
.send:disabled { opacity: .3; }
.send:not(:disabled):hover { transform: translateY(-1px); }
.quick { max-width: 760px; margin: 0 auto 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick[hidden] { display: none; }
.quick .chip { font-size: 13px; padding: 6px 12px; flex: none; }

/* Rail */
.rail { border-left: 1px solid var(--line); padding: 16px; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; background: var(--surface); min-width: 0; }
.rcard > * { min-width: 0; }
.rcard { border: 1px solid var(--line); border-radius: var(--r-box); padding: 14px; background: rgba(var(--tint, 27, 36, 64),.02); display: grid; gap: 10px; font-size: 13px; }
.rcard h4 { margin: 0; font-size: 12px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.addr { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: var(--r-ctl); background: var(--surface); border: 1px solid var(--line); font: 12.5px var(--mono); }
.addr span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 28px; height: 28px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.04); display: grid; place-items: center; color: var(--text-2); flex: none; transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(var(--tint, 27, 36, 64),.09); color: var(--text); }
.stat-big { display: flex; align-items: baseline; gap: 6px; }
.stat-big b { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.stat-big span { color: var(--muted); }
.sparkline { width: 100%; height: 38px; overflow: visible; }
.who { display: flex; flex-wrap: wrap; gap: 6px; }
.who .avatar { width: 26px; height: 26px; font-size: 10px; }
.mini-meters { display: grid; gap: 10px; }
.mini-meters .row { display: grid; gap: 5px; }
.mini-meters .row div:first-child { display: flex; justify-content: space-between; color: var(--text-2); }
.mini-meters .row span:last-child { font-family: var(--sans); color: var(--muted); font-size: 12px; }
.act-list { display: grid; gap: 10px; }
.act { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 12.5px; color: var(--text-2); animation: msg-in .4s var(--ease); }
.act i { width: 18px; height: 18px; border-radius: var(--r-ctl); display: grid; place-items: center; font-style: normal; font-size: 10px; background: rgba(61,220,151,.1); color: var(--good); }
.act i.ai { background: rgba(255,203,61,.12); color: var(--accent-2); }
.act i.warn { background: rgba(255,194,75,.1); color: var(--warn); }
.act small { display: block; color: #6b7590; font-size: 11.5px; }

/* Overview */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.tile { padding: 16px; border-radius: var(--r-box); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(var(--tint, 27, 36, 64),.03), rgba(var(--tint, 27, 36, 64),.01)); display: grid; gap: 6px; }
.tile small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.tile b { font-size: 28px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile .up { color: var(--good); }
.charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-bottom: 12px; }
.chart-box { position: relative; padding: 8px 16px 14px; }
.chart-box svg { width: 100%; height: 200px; overflow: visible; }
.chart-box .grid-line { stroke: rgba(var(--tint, 27, 36, 64),.06); stroke-width: 1; }
.chart-box .axis { fill: #6b7590; font: 11px var(--sans); }
.chart-tip { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: var(--r-ctl); background: var(--surface); border: 1px solid var(--line-2); font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -120%); opacity: 0; transition: opacity .15s; box-shadow: 0 10px 30px -8px rgba(27,36,64,.16); }
.chart-tip b { font-weight: 600; } .chart-tip small { color: var(--muted); display: block; font-size: 11px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feed { padding: 6px 8px; display: grid; }
.feed-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 10px 8px; border-radius: var(--r-ctl); font-size: 13.5px; }
.feed-row:hover { background: rgba(var(--tint, 27, 36, 64),.02); }
.feed-row .fi { width: 26px; height: 26px; border-radius: var(--r-ctl); display: grid; place-items: center; background: rgba(var(--tint, 27, 36, 64),.04); border: 1px solid var(--line); color: var(--text-2); }
.feed-row .fi.ai { color: var(--accent-2); background: rgba(255,203,61,.1); border-color: rgba(255,203,61,.22); }
.feed-row small { color: var(--muted); display: block; font-size: 12px; }
.feed-row time { color: #6b7590; font: 12px var(--sans); }

/* Console */
.console { display: none; flex-direction: column; height: 100%; padding: 20px 28px 24px; gap: 12px; }
.view.on.console { display: flex; }
.con-out { flex: 1; min-height: 0; overflow-y: auto; border-radius: var(--r-box); border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; font: 12.8px/1.75 var(--mono); color: var(--text-2); }
.con-out div { white-space: pre-wrap; word-break: break-word; }
.con-out .t { color: #a3acbf; } .con-out .i { color: var(--cyan); } .con-out .w { color: var(--warn); } .con-out .e { color: var(--bad); } .con-out .o { color: var(--good); } .con-out .a { color: var(--accent-2); } .con-out .u { color: var(--text); }
.con-in { display: flex; align-items: center; gap: 10px; border-radius: var(--r-box); border: 1px solid var(--line-2); background: var(--surface); padding: 0 8px 0 16px; height: 48px; font-family: var(--mono); }
.con-in:focus-within { border-color: rgba(255,203,61,.6); box-shadow: 0 0 0 4px rgba(255,203,61,.12); }
.con-in span { color: var(--accent-2); }
.con-in input { flex: 1; border: 0; outline: none; background: transparent; font: 14px var(--mono); }
.con-tools { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.con-tools .muted { font-size: 12.5px; }

/* Files */
.files { display: none; grid-template-columns: 260px 1fr; height: 100%; }
.view.on.files { display: grid; }
.tree { border-right: 1px solid var(--line); padding: 14px 10px; overflow-y: auto; font-size: 13.5px; background: var(--surface); }
.tree h4 { font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6b7590; margin: 6px 8px 10px; }
.tree button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--text-2); text-align: left; font-family: var(--mono); font-size: 12.8px; }
.tree button:hover { background: rgba(var(--tint, 27, 36, 64),.04); color: var(--text); }
.tree button.on { background: rgba(255,203,61,.1); color: var(--text); }
.tree .dir { color: var(--muted); cursor: default; }
.tree .dir:hover { background: transparent; color: var(--muted); }
.tree .ind1 { padding-left: 22px; } .tree .ind2 { padding-left: 36px; }
.tree .badge { margin-left: auto; font-size: 10px; padding: 1px 6px; }
.viewer { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.viewer-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 13px var(--mono); color: var(--text-2); flex-wrap: wrap; }
.viewer-head .grow { flex: 1; }
.code { flex: 1; overflow: auto; margin: 0; padding: 16px 0; font: 13px/1.75 var(--mono); counter-reset: ln; background: var(--surface); }
.code span.l { display: block; padding: 0 18px 0 0; white-space: pre; }
.code span.l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 48px; padding-right: 16px; text-align: right; color: var(--faint, #c3cad8); user-select: none; }
.code .c { color: #6b7590; } .code .k { color: var(--accent-2); } .code .v { color: #9be8c6; } .code .s { color: #ffb38a; } .code .n { color: var(--cyan); }
.code span.l.hl { background: rgba(61,220,151,.07); box-shadow: inset 2px 0 0 var(--good); }

/* Tables (players, backups) */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(var(--tint, 27, 36, 64),.02); }
.table .name { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.table .actions { text-align: right; white-space: nowrap; }
.table .mono { font-size: 12.5px; }
.row-new { animation: row-new 1.6s var(--ease); }
@keyframes row-new { from { background: rgba(255,203,61,.18); } }
.table-wrap { overflow-x: auto; }

/* Integrations */
.int-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.int { padding: 18px; display: grid; gap: 14px; align-content: start; }
.int-head { display: flex; align-items: center; gap: 12px; }
.int-logo { width: 40px; height: 40px; border-radius: var(--r-ctl); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.int-head b { display: block; font-weight: 500; } .int-head small { color: var(--muted); font-size: 12.5px; }
.int-head .badge { margin-left: auto; }
.int ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.int li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-ctl); background: rgba(var(--tint, 27, 36, 64),.02); border: 1px solid var(--line); color: var(--text-2); }
.map-row { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr 90px; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.map-row:last-child { border-bottom: 0; }
.map-row.head { color: var(--muted); font-size: 12px; padding-block: 10px; }
.map-row .arrow-r { color: #a3acbf; text-align: center; }
.map-row .sync-st { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--good); justify-content: flex-end; }
.map-row .sync-st.run { color: var(--muted); }
.pill-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-ctl); background: rgba(var(--tint, 27, 36, 64),.04); border: 1px solid var(--line); font-size: 13px; color: var(--text); width: fit-content; }

/* Settings */
.set-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; align-items: start; }
.form { padding: 18px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 13.5px; align-content: start; }
.field label { color: var(--text-2); }
.field input, .field select { height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 14px; color: var(--text); outline: none; }
.field input:focus, .field select:focus { border-color: rgba(255,203,61,.6); box-shadow: 0 0 0 4px rgba(255,203,61,.12); }
.field small { color: var(--muted); font-size: 12px; }
.field .with-suffix { display: flex; align-items: center; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.field .with-suffix input { border: 0; background: transparent; flex: 1; min-width: 0; box-shadow: none; }
.field .with-suffix span { padding: 0 12px; color: var(--muted); font: 13px var(--mono); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.toggle small { display: block; color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-box); background: rgba(var(--tint, 27, 36, 64),.12); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 1px; background: var(--surface); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-box { padding: 18px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.plan-box::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 100% 0%, rgba(255,203,61,.18), transparent); pointer-events: none; }
.plan-box h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.danger { border-color: rgba(255,107,107,.25); }
.danger .form { gap: 10px; }
.btn-danger { background: rgba(255,107,107,.12); color: var(--bad); border: 1px solid rgba(255,107,107,.3); }
.btn-danger:hover { background: rgba(255,107,107,.2); }

/* Modal */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(var(--tint, 27, 36, 64),.32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 14vh 16px 16px; animation: fade .2s; }
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); border-radius: var(--r-box); border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 100px -20px rgba(27,36,64,.16); padding: 22px; display: grid; gap: 14px; animation: pop .25s var(--ease); }
.modal h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.modal p { margin: 0; color: var(--text-2); font-size: 14px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal input { height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font: 14px var(--mono); outline: none; color: var(--text); }
.modal input:focus { border-color: rgba(255,107,107,.6); }

/* Command palette */
.palette { width: min(620px, 100%); border-radius: var(--r-box); border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 120px -20px rgba(27,36,64,.16), 0 0 0 1px rgba(255,203,61,.08); overflow: hidden; animation: pop .22s var(--ease); }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); }
.pal-in input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; }
.pal-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.pal-group { font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6b7590; padding: 10px 10px 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: var(--r-ctl); border: 0; background: transparent; text-align: left; font-size: 14px; color: var(--text-2); }
.pal-item.on { background: rgba(255,203,61,.12); color: var(--text); }
.pal-item .ico { color: var(--muted); } .pal-item.on .ico { color: var(--accent-2); }
.pal-item kbd { margin-left: auto; }
.pal-item .ask { color: var(--accent-2); }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pal-foot span { display: inline-flex; gap: 6px; align-items: center; }

/* Create flow */
.create { position: fixed; inset: 0; z-index: 70; background: var(--surface); overflow-y: auto; animation: fade .35s; }
.create[hidden] { display: none; }
.create .aurora .blob { opacity: .35; }
.create-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.create-body { position: relative; z-index: 1; width: min(760px, 100% - 32px); margin: 0 auto; padding: 6vh 0 80px; }
.cstep { animation: view-in .5s var(--ease); }
.cstep h1 { font-size: clamp(34px, 5.4vw, 56px); letter-spacing: -.05em; line-height: 1; font-weight: 600; margin: 18px 0 14px; text-align: center; }
.cstep > p.sub { text-align: center; color: var(--text-2); margin: 0 auto 30px; max-width: 520px; font-size: 17px; }
.c-games { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.c-game { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.03); font-size: 14px; color: var(--text-2); transition: .2s; }
.c-game:hover { border-color: var(--line-2); color: var(--text); }
.c-game.on { border-color: rgba(255,203,61,.7); background: rgba(255,203,61,.12); color: var(--text); }
.c-game[disabled] { opacity: .45; cursor: not-allowed; }
.c-game small { font: 10.5px var(--sans); color: var(--muted); }
.big-prompt { position: relative; }
.big-prompt .prompt-glow { position: absolute; inset: -2px; border-radius: var(--r-box); background: var(--grad); filter: blur(20px); opacity: .4; z-index: -1; }
.big-prompt .box { border-radius: var(--r-box); border: 1px solid rgba(var(--tint, 27, 36, 64),.16); background: var(--surface); padding: 16px; backdrop-filter: blur(20px); }
.big-prompt textarea { width: 100%; min-height: 84px; border: 0; outline: none; background: transparent; resize: none; font-size: 18px; line-height: 1.5; color: var(--text); }
.big-prompt textarea::placeholder { color: #6b7590; }
.big-prompt .bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.big-prompt .bar > span { display: inline-flex; align-items: center; gap: 6px; }
.c-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.think-list { display: grid; gap: 12px; max-width: 420px; margin: 0 auto; }
.think-list div { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); animation: msg-in .4s var(--ease); }
.think-list div.ok { color: var(--text); }
.think-list .okc { width: 16px; height: 16px; border-radius: var(--r-ctl); background: var(--good); display: grid; place-items: center; flex: none; }
.think-list .okc::after { content: ""; width: 6px; height: 3px; border: 2px solid #1b2440; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.rec { border-radius: var(--r-box); border: 1px solid var(--line-2); background: var(--surface); overflow: hidden; box-shadow: 0 40px 100px -30px rgba(255,203,61,.35); backdrop-filter: blur(20px); }
.rec-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px; border-bottom: 1px solid var(--line); }
.rec-head p { margin: 2px 0 0; color: var(--text-2); font-size: 14.5px; }
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
.rec-grid .field input, .rec-grid .field select { background: var(--surface); }
.tier-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tier { position: relative; text-align: left; padding: 12px 14px; border-radius: var(--r-box); border: 1px solid var(--line); background: rgba(var(--tint, 27, 36, 64),.02); font-size: 13px; color: var(--muted); display: grid; gap: 2px; transition: .2s; }
.tier b { color: var(--text); font-size: 15px; font-weight: 500; }
.tier.on { border-color: rgba(255,203,61,.7); background: rgba(255,203,61,.1); box-shadow: 0 0 0 3px rgba(255,203,61,.12); }
.tier[disabled] { opacity: .45; cursor: not-allowed; }
.rec-list { list-style: none; margin: 0; padding: 0 20px 6px; display: grid; gap: 8px; }
.rec-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); padding: 10px 12px; border-radius: var(--r-ctl); background: rgba(var(--tint, 27, 36, 64),.02); border: 1px solid var(--line); animation: msg-in .4s var(--ease) backwards; }
.rec-list li b { color: var(--text); font-weight: 500; }
.rec-list .k { width: 26px; height: 26px; border-radius: var(--r-ctl); display: grid; place-items: center; background: rgba(255,203,61,.1); color: var(--accent-2); flex: none; }
.limits { margin: 14px 20px 0; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.limits b { color: var(--text-2); font-weight: 500; }
.eula { display: flex; gap: 12px; align-items: flex-start; margin: 14px 20px 0; padding: 12px 14px; border-radius: var(--r-ctl); background: rgba(255,194,75,.05); border: 1px solid rgba(255,194,75,.22); font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.eula input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.eula a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.rec-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 18px 20px; margin-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rec-foot .note { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.prov { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.ring { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: rgba(var(--tint, 27, 36, 64),.07); }
.ring .prog { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); filter: drop-shadow(0 0 8px rgba(46,230,214,.6)); }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .pct b { font-size: 40px; font-weight: 600; letter-spacing: -.04em; display: block; line-height: 1; }
.ring .pct small { color: var(--muted); font-size: 12.5px; }
.prov-steps { display: grid; gap: 10px; }
.prov-steps div { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: #6b7590; transition: color .3s; }
.prov-steps div.run { color: var(--text-2); } .prov-steps div.ok { color: var(--text); }
.prov-steps .st { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(var(--tint, 27, 36, 64),.15); flex: none; display: grid; place-items: center; }
.prov-steps .run .st { border-top-color: var(--accent-2); animation: spin .7s linear infinite; }
.prov-steps .ok .st { background: var(--good); border-color: var(--good); }
.prov-steps .ok .st::after { content: ""; width: 7px; height: 4px; border: 2px solid #1b2440; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.prov-log { margin-top: 26px; height: 150px; overflow: hidden; border-radius: var(--r-box); border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; font: 12px/1.7 var(--mono); color: var(--muted); display: flex; flex-direction: column; justify-content: flex-end; }
.prov-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: msg-in .25s; }
.done-hero { text-align: center; display: grid; justify-items: center; gap: 14px; }
.done-hero .live-badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--r-ctl); background: rgba(61,220,151,.1); border: 1px solid rgba(61,220,151,.35); color: var(--good); font-size: 18px; font-weight: 600; }
.done-hero .addr { width: min(440px, 100%); font-size: 15px; padding: 10px 10px 10px 16px; }
.done-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* Toasts sit at the top so they never cover the composer */
.panel .toasts { top: 70px; bottom: auto; }

/* Demo note in the sidebar */
.demo-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-ctl); font-size: 12px; color: var(--muted); border: 1px dashed var(--line-2); }
.demo-note a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Demo banner (unused) */
.demo-flag { position: fixed; left: 14px; bottom: 14px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: var(--r-ctl); font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); backdrop-filter: blur(12px); box-shadow: 0 10px 30px -10px rgba(27,36,64,.16); }
.demo-flag a { padding: 4px 10px; border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font-weight: 500; }
.demo-flag .x { border: 0; background: none; color: var(--muted); padding: 0 4px; font-size: 16px; line-height: 1; }

/* Responsive */
@media (max-width: 1240px) { .assistant { grid-template-columns: minmax(0, 1fr); } .view.on.assistant { display: grid; } .rail { display: none; } .search { width: 220px; } }
@media (max-width: 980px) { .tiles { grid-template-columns: 1fr 1fr; } .charts, .two, .int-grid, .set-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 268px; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: 30px 0 80px rgba(27,36,64,.16); }
  .side.open { transform: none; }
  .burger { display: grid; }
  .search { width: auto; flex: 0 0 auto; } .search span, .search kbd { display: none; }
  .crumbs .hide-sm { display: none; }
  .files { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .tree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; }
  .map-row { grid-template-columns: 1fr 1fr 1fr; } .map-row .arrow-r, .map-row.head span:nth-child(even) { display: none; } .map-row .sync-st { grid-column: 1 / -1; justify-content: flex-start; }
  .prov { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top { padding: 0 12px; gap: 8px; } .power { display: none; }
  .view-pad { padding: 18px 16px; }
  .thread { padding: 18px 16px 8px; } .composer-wrap { padding: 8px 12px 14px; }
  .suggest { grid-template-columns: 1fr; }
  .console { padding: 14px 12px 16px; }
  .diag { grid-template-columns: 1fr 1fr; }
  .rec-grid, .tier-pick { grid-template-columns: 1fr; }
  .table .hide-sm { display: none; }
  .top .btn-new span { display: none; }
}

/* Create flow: a dark world map behind the steps */
.create .world { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .45; pointer-events: none; --map-ink: #ebedef; --map-paper: #ffffff; --map-accent: #ffcb3d; }

.big-prompt .prompt-glow { display: none; }
.big-prompt .box { border-color: rgba(235,237,239,.35); }
.cstep h1 { text-wrap: balance; }


/* ===== Light theme, matching the homepage ===== */
body.panel {
  /* Dim, not stark white: a soft blue-grey page with off-white cards. */
  --bg: #d8dee7; --bg-2: #d0d7e1; --surface: #edf0f4; --surface-2: #e3e7ee; --surface-3: #d9dfe8;
  --line: #c9d1dd; --line-2: #b9c3d1; --side: #e2e6ed; --glass: rgba(237,240,244,.9); --text: #1b2440; --text-2: #3f4a66; --muted: #6b7590;
  --accent-2: #2f80c9; --good: #1f9d5c; --warn: #c27c0e; --bad: #d9473a;
  --r-ctl: 10px; --r-box: 18px;
  --sh-1: 0 1px 2px rgba(27,36,64,.05), 0 6px 20px rgba(27,36,64,.06);
  --sh-2: 0 2px 6px rgba(27,36,64,.05), 0 24px 60px -18px rgba(27,36,64,.22);
  background: var(--bg); color: var(--text); color-scheme: light;
}
body.panel ::selection { background: #ffcb3d; color: #1b2440; }
body.panel :focus-visible { outline: 3px solid #3d9be9; outline-offset: 2px; border-radius: 10px; }
.side { background: var(--side); border-right: 1px solid var(--line); }
.switch-btn { background: var(--surface-2); }
.nav-item.on { background: var(--sel-bg, #eaf3fc); color: var(--text); box-shadow: none; }
.nav-item.on .ico { color: var(--sel-ink, #2f80c9); }
.top { background: var(--glass); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.search { background: var(--surface-2); }
.power button { background: var(--surface); }
.panel-card, .tile, .rcard, .plan-card, .modal, .palette, .rec, .int, .usage, .faq details { box-shadow: var(--sh-1); }
.panel-card, .tile, .rcard { background: var(--surface); }
.plan-card { background: var(--surface); border-color: var(--line); }
.plan-card.done { border-color: var(--good-line, #bfe8d0); }
.pc-foot { background: var(--surface-2); }
.m.user .bubble { color: #fff; border-radius: 18px 18px 6px 18px; }
.ai-av { border-radius: 10px; }
.welcome-orb:not(.has-wisp) { border-radius: 22px; box-shadow: 0 16px 40px -12px rgba(255,203,61,.8); }
.suggest button { background: var(--surface); box-shadow: var(--sh-1); border-radius: 16px; }
.suggest button:hover { border-color: var(--sel-line, #b9d8f5); background: var(--surface); box-shadow: var(--sh-2); }
.composer { background: var(--surface); border-radius: 22px; box-shadow: var(--sh-2); }
.composer:focus-within { border-color: var(--sel-line, #b9d8f5); box-shadow: 0 0 0 4px rgba(61,155,233,.15), var(--sh-2); }
.send { background: var(--ink-fill, #1b2440); color: #fff; border-radius: 12px; }
.quick .chip, .c-chips .chip { background: var(--surface); border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; box-shadow: var(--sh-1); }
.quick .chip:hover, .c-chips .chip:hover { color: var(--text); box-shadow: var(--sh-2); }
.tool-trace span { background: var(--surface); border-radius: 999px; }
.rail { background: var(--bg); }
.addr, .field input, .field select, .field .with-suffix, .modal input, .con-in { background: var(--surface); }
.usage { background: linear-gradient(180deg, var(--warn-bg, #fbf1d2), var(--surface)); border-color: var(--warn-line, #f6e2a6); }
.demo-note { border-radius: 12px; }
.badge { background: var(--surface-2); color: var(--text-2); border-color: var(--line); border-radius: 999px; }
.badge.good { background: var(--good-bg, #e8f8ef); color: var(--good-ink, #157a4a); border-color: var(--good-line, #c9eed9); }
.badge.warn { background: var(--warn-bg, #fff4d1); color: var(--warn-ink, #8a6200); border-color: var(--warn-line, #f6e2a6); }
.badge.bad { background: var(--bad-bg, #ffeceb); color: var(--bad-ink, #b4372b); border-color: var(--bad-line, #ffd2cd); }
.badge.violet { background: var(--warn-bg, #fff4d1); color: var(--warn-ink, #8a6200); border-color: var(--warn-line, #f6e2a6); }
.status-pill { background: var(--good-bg, #e8f8ef); color: var(--good-ink, #157a4a); border-color: var(--good-line, #c9eed9); }
.status-pill.off { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.status-pill.busy { background: var(--warn-bg, #fff4d1); color: var(--warn-ink, #8a6200); border-color: var(--warn-line, #f6e2a6); }
kbd { background: var(--surface); color: var(--text-2); border-color: var(--line-2); }
.btn { border-radius: 12px; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--sh-1); }
.btn-ghost:hover { background: var(--surface); border-color: var(--line-2); box-shadow: var(--sh-2); }
.btn-primary { background: #ffcb3d; color: #1b2440; box-shadow: 0 1px 0 #e6b22a, var(--sh-1); }
.btn-primary:hover { background: #ffd35c; box-shadow: 0 1px 0 #e6b22a, var(--sh-2); }
.btn-danger { background: var(--bad-bg, #ffeceb); color: var(--bad-ink, #b4372b); border-color: var(--bad-line, #ffd2cd); }
.toast { background: var(--ink-fill, #1b2440); color: #fff; border-color: transparent; border-radius: 14px; }
.chart-tip { background: var(--ink-fill, #1b2440); color: #fff; border-radius: 10px; }
.chart-box .grid-line { stroke: rgba(var(--tint, 27, 36, 64),.08); }
.chart-box .axis { fill: #8a93a8; }
.overlay { background: rgba(var(--tint, 27, 36, 64),.3); }
.pal-item.on { background: var(--sel-bg, #eaf3fc); }
.pal-item.on .ico { color: var(--sel-ink, #2f80c9); }
.tree { background: var(--surface); }
.tree button.on { background: var(--sel-bg, #eaf3fc); }
.files .viewer { background: var(--surface); }
.avatar { border-radius: 10px; }
.meter, .stat-bar { border-radius: 999px; }
.meter i { background: linear-gradient(90deg, #3d9be9, #22b36b); border-radius: 999px; }
.tick, .pc-items .k { border-radius: 9px; }

/* Dark islands: console, code and diffs read like a terminal */
.con-out, .code, .pc-detail { background: #141b31; color: #b8c0d4; border-radius: 16px; --text: #e8ecf5; --text-2: #b8c0d4; --muted: #7d879f; }
.con-out .t, .code span.l::before { color: #56607a; }
.pc-detail .fname { color: #8a93a8; border-color: rgba(255,255,255,.08); }
.pc-detail pre { color: #b8c0d4; }
.code { border-radius: 0 0 0 0; }

/* World card (Overview) */
.world-card { position: relative; height: 200px; border-radius: 18px; overflow: hidden; background: var(--sky-fill, #8fd3ff); margin-bottom: 12px; box-shadow: var(--sh-1); }
.world-card canvas.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.world-card .wc-label { position: absolute; z-index: 4; left: 14px; top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); font: 600 13px var(--pixel); }

/* Create flow: a daytime title screen */
.create { background: var(--bg); }
.create .world { opacity: 1; pointer-events: none; }
.create-glow { position: absolute; z-index: 1; left: 50%; top: 38%; width: min(1100px, 130vw); height: 640px; translate: -50% -50%; pointer-events: none; background: radial-gradient(closest-side, rgba(255,255,255,.85), rgba(255,255,255,.5) 55%, rgba(255,255,255,0)); }
.create-top .brand, .create-top { color: var(--text); }
.big-prompt .box { background: var(--surface); border-color: var(--line); border-radius: 26px; box-shadow: var(--sh-2); }
.big-prompt .prompt-glow { display: block; inset: -14px; border-radius: 34px; background: linear-gradient(110deg, rgba(61,155,233,.38), rgba(34,179,107,.3), rgba(255,203,61,.42)); filter: blur(24px); opacity: .85; }
.big-prompt textarea { color: var(--text); }
.c-game { background: var(--surface); border-color: var(--line); color: var(--text-2); border-radius: 999px; box-shadow: var(--sh-1); }
.c-game.on { background: var(--sel-bg, #eaf3fc); border-color: var(--sel-line, #b9d8f5); color: var(--text); }
.rec { background: var(--surface); border-radius: 24px; }
.tier { background: var(--surface); border-radius: 14px; }
.tier.on { background: var(--sel-bg, #eaf3fc); border-color: var(--sel-line, #b9d8f5); box-shadow: 0 0 0 3px rgba(61,155,233,.15); }
.rec-list li { background: var(--surface-2); border-radius: 12px; }
.limits { border-radius: 12px; }
.eula { border-radius: 12px; background: var(--warn-bg, #fff8e0); border-color: var(--warn-line, #f6e2a6); }
.think-list div { color: var(--muted); }
.think-list div.ok { color: var(--text); }
.prov-log { background: #141b31; color: #8a93a8; border-radius: 16px; }
.done-hero .live-badge { background: var(--good-bg, #e8f8ef); border-color: var(--good-line, #c9eed9); color: var(--good-ink, #157a4a); border-radius: 999px; }
.cstep, .rec, .think-list, .prov, .done-hero { position: relative; z-index: 2; }
.cstep > p.sub { color: var(--text-2); }
.world-card .led-dot { width: 8px; height: 8px; border-radius: 50%; background: #22b36b; }


/* ===== Workspaces ===== */
.ws-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; box-shadow: var(--sh-1); transition: border-color .2s, box-shadow .2s; }
.ws-btn:hover { border-color: var(--ws, #b9d8f5); box-shadow: var(--sh-2); }
.ws-btn small { display: block; font: 600 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ws-btn b { display: block; font-size: 15px; font-weight: 700; }
.ws-btn .grow { flex: 1; min-width: 0; }
.ws-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--ws, #22b36b) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ws, #22b36b) 30%, #fff); }
.ws-ico.sm { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); box-shadow: none; }
.ws-ico img { border-radius: 5px; }
.ws-switch { margin-bottom: -6px; }
.ws-menu { padding: 8px; }
.ws-menu .menu-label { padding: 4px 8px 8px; font: 600 11px var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ws-menu button { align-items: center; padding: 8px; border-radius: 10px; }
.ws-menu button small { display: block; font-size: 12px; color: var(--muted); }
.ws-menu button .grow { flex: 1; min-width: 0; }
.ws-menu button[disabled] { opacity: .55; cursor: not-allowed; }
.menu { background: var(--surface); border-color: var(--line); box-shadow: var(--sh-2); border-radius: 16px; }
.menu button:hover, .menu button.on { background: var(--surface-2); }
.nav-item.on { box-shadow: inset 3px 0 0 var(--ws, #3d9be9); }
.nav-item.on .ico { color: var(--ws, #2f80c9); }
.ws-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; padding: 22px 24px; border-radius: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--ws) 12%, var(--surface)), var(--paper, #fff) 70%); border: 1px solid color-mix(in srgb, var(--ws) 25%, var(--surface)); box-shadow: var(--sh-1); }
.ws-wordmark { height: 40px; width: auto; }
.ws-hero p { margin: 10px 0 0; color: var(--text-2); font-size: 14.5px; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.srv-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-1); text-align: left; transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s; }
.srv-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.srv-card.is-current { border-color: color-mix(in srgb, var(--ws) 45%, var(--surface)); }
.srv-world { position: relative; height: 140px; background: var(--sky-fill, #8fd3ff); cursor: grab; }
.srv-world canvas.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.srv-body { display: grid; gap: 8px; padding: 14px 16px 16px; }
.srv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.srv-top b { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.srv-addr { font: 500 13px var(--mono); color: var(--text-2); }
.srv-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.srv-acts { display: flex; gap: 8px; margin-top: 4px; }
.srv-new { align-items: center; justify-content: center; gap: 6px; min-height: 280px; border-style: dashed; border-width: 2px; background: var(--bg-2); cursor: pointer; text-align: center; }
.srv-new b { font-size: 16px; } .srv-new small { color: var(--muted); }
.srv-new-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 6px; background: color-mix(in srgb, var(--ws) 14%, var(--surface)); color: var(--ws); }
.can-list { list-style: none; margin: 0; padding: 10px 16px 16px; display: grid; gap: 4px; }
.can-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; }
.can-list .ico { color: var(--good); }
.catalogue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 16px 16px; }
.catalogue.one { grid-template-columns: minmax(0, 1fr); }
.cat-item { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.catalogue.one .cat-item { grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; }
.catalogue.one .cat-item small { grid-column: 1; }
.catalogue.one .cat-item .btn, .catalogue.one .cat-item .badge { grid-column: 2; grid-row: 1 / span 2; }
.cat-item b { font-size: 15px; } .cat-item small { color: var(--muted); font-size: 13px; }
.cat-item .btn { justify-self: start; margin-top: 6px; }
.world-card.tall { height: 240px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .catalogue { grid-template-columns: minmax(0, 1fr); } }
.ws-menu { right: auto; width: 320px; max-width: calc(100vw - 32px); }

/* Live mode: views that show example data say so, and server progress or problems are shown in plain words. */
.preview-note { display: flex; align-items: center; gap: 8px; margin: 16px 24px 0; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: 13.5px; color: var(--text-2); background: rgba(255, 255, 255, .03); }
.preview-note.bad { border-style: solid; border-color: var(--bad); color: var(--text); }

/* Create wizard: the Wisp asks, you tap */
.cstep.wiz { text-align: center; }
.wiz-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 32px; }
.wiz-back { justify-self: start; font-size: 14px; }
.wiz-dots { display: flex; gap: 6px; align-items: center; }
.wiz-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(var(--tint, 27, 36, 64),.15); transition: width .3s var(--ease), background .3s; }
.wiz-dots i.done { background: rgba(var(--tint, 27, 36, 64),.4); }
.wiz-dots i.on { width: 24px; background: var(--accent); }
.wiz-guide { display: grid; justify-items: center; margin: 4px 0 26px; }
.wiz-wisp { width: 96px; height: 96px; }
.wiz-wisp.big { width: 128px; height: 128px; margin: 0 auto 6px; }
.cstep.wiz h1 { font-size: clamp(28px, 4.4vw, 44px); margin: 6px 0 8px; }
.wiz-sub { color: var(--text-2); margin: 0 auto; max-width: 540px; font-size: 16.5px; }
.wiz-cards { display: grid; gap: 12px; }
.wiz-cards.g3 { grid-template-columns: repeat(3, 1fr); }
.wiz-card { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 24px 16px 20px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); color: var(--text); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.wiz-card:hover:not([disabled]), .wiz-card:focus-visible { transform: translateY(-3px); border-color: var(--sel-line, #b9d8f5); box-shadow: var(--sh-2); }
.wiz-card.on { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,203,61,.2), var(--sh-1); }
.wiz-card[disabled] { opacity: .55; cursor: not-allowed; }
.wiz-card svg, .wiz-card img { width: 30px; height: 30px; margin-bottom: 4px; }
.wiz-card b { font-size: 17px; font-weight: 600; }
.wiz-card span { font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.wiz-card small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wiz-card .wiz-num { font: 600 38px/1 var(--pixel); margin-bottom: 2px; }
.wiz-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin: 18px 0 0; }
.wiz-wishes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.wiz-wish { display: flex; gap: 12px; align-items: center; padding: 15px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); font-size: 15px; color: var(--text); text-align: left; transition: border-color .2s, background .2s; }
.wiz-wish:hover { border-color: var(--sel-line, #b9d8f5); }
.wiz-wish .tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(var(--tint, 27, 36, 64),.2); flex: none; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.wiz-wish.on { border-color: var(--accent); background: var(--warn-bg, #fffbea); }
.wiz-wish.on .tick { background: var(--accent); border-color: var(--accent); }
.wiz-wish.on .tick::after { content: ""; width: 9px; height: 5px; border: 2px solid #1b2440; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.wiz-other { width: 100%; margin-top: 10px; height: 52px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 15px; color: var(--text); outline: none; }
.wiz-other:focus, .wiz-name:focus { border-color: var(--sel-line, #b9d8f5); box-shadow: 0 0 0 4px rgba(61,155,233,.15); }
.wiz-foot { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.wiz-form { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; text-align: left; }
.wiz-name { width: 100%; height: 64px; padding: 0 20px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); font: 600 26px var(--display); letter-spacing: -.02em; color: var(--text); text-align: center; outline: none; box-shadow: var(--sh-1); }
.wiz-addr { text-align: center; color: var(--text-2); font-size: 14px; }
.wiz-addr b { font: 500 13.5px var(--mono); color: var(--text); }
.wiz-msg { text-align: center; color: var(--bad); font-size: 13px; min-height: 0; }
.wiz-msg:empty { display: none; }
.wiz-summary { list-style: none; margin: 4px 0 0; padding: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); }
.wiz-summary li { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14.5px; color: var(--text-2); }
.wiz-summary li + li { border-top: 1px solid var(--line); }
.wiz-summary li > span { flex: 1; min-width: 0; }
.wiz-summary li svg, .wiz-summary li img { width: 16px; height: 16px; flex: none; }
.wiz-summary b { color: var(--text); font-weight: 600; }
.wiz-summary li.wiz-ver { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 0; }
.wiz-summary li.wiz-ver + li, .wiz-summary li + li.wiz-ver { border-top: 0; }
.wiz-ver select { height: 40px; width: 100%; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 14px; color: var(--text); outline: none; }
.wiz-ver select:focus { border-color: rgba(255,203,61,.6); box-shadow: 0 0 0 4px rgba(255,203,61,.12); }
.wiz-ver small { font-size: 12.5px; color: var(--text-3, var(--text-2)); line-height: 1.4; }
.wiz-form .eula { margin: 0; }
.wiz-go { width: 100%; justify-content: center; margin-top: 4px; }
.wiz-form .wiz-note { justify-content: center; margin: 0; }
.wiz-bar { height: 10px; max-width: 420px; margin: 22px auto 24px; border-radius: 99px; background: rgba(var(--tint, 27, 36, 64),.08); overflow: hidden; }
.wiz-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .8s var(--ease); }
.wiz-steps { max-width: 320px; margin: 0 auto; text-align: left; }
.wiz-log { max-width: 520px; margin: 22px auto 0; text-align: left; }
.wiz-log summary { cursor: pointer; color: var(--muted); font-size: 13px; text-align: center; list-style: none; }
.wiz-log summary::-webkit-details-marker { display: none; }
.wiz-log .prov-log { margin-top: 10px; height: 120px; }
.wiz-next { display: flex; gap: 10px; align-items: flex-start; max-width: 520px; margin: 18px auto 6px; padding: 12px 16px; border-radius: 16px; background: var(--warn-bg, #fffbea); border: 1px solid var(--warn-line, #f6e3a3); color: var(--text-2); font-size: 14.5px; text-align: left; }
.wiz-next svg { flex: none; margin-top: 2px; color: #b98500; }
.done-hero.wiz .addr { max-width: 420px; margin: 18px auto 0; }
@media (max-width: 640px) {
  .wiz-cards.g3, .wiz-wishes { grid-template-columns: 1fr; }
  .wiz-card { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 14px; padding: 16px; }
  .wiz-card > :first-child { grid-row: span 3; align-self: center; margin: 0; }
  .wiz-card .wiz-num { font-size: 30px; }
  .wiz-wisp { width: 72px; height: 72px; }
}
.wiz-form .wiz-note { justify-self: center; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.88); }
.wiz-go[disabled] { opacity: 1; background: var(--off-bg, #e8ecf2); color: #7a8399; box-shadow: none; cursor: not-allowed; }
.wiz-note { padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.75); }
/* The Wisp already shows that the assistant is thinking */
.m.ai:has(.has-wisp) .thinking .spinner { display: none; }
.create { overflow-x: hidden; }

/* Plugins page */
.addons { position: relative; }
.addons .panel-card { margin-top: 12px; }
.add-box { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); }
.add-wisp { width: 48px; height: 48px; flex: none; }
.add-wisp.big { width: 96px; height: 96px; }
.add-main { flex: 1; min-width: 0; }
.add-form { display: flex; gap: 8px; }
.add-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-size: 15px; color: var(--text); outline: none; }
.add-form input:focus { border-color: var(--sel-line, #b9d8f5); box-shadow: 0 0 0 4px rgba(61,155,233,.15); }
.add-hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.add-hint .link-btn { cursor: pointer; }
.add-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: var(--warn-bg, #fffbea); border: 1px solid var(--warn-line, #f6e3a3); color: var(--text-2); font-size: 14px; }
.add-note svg { flex: none; margin-top: 2px; }
.addon-row { grid-template-columns: 36px 1fr auto; }
.addon-row small { white-space: normal; }
.addon-row small svg { vertical-align: -1px; color: var(--mint-ink, #1d8a53); }
/* A plugin's picture over a letter tile in one of the theme's pastels (plugPic in panel.js). */
.pic { --s: 36px; position: relative; flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); overflow: hidden;
  border-radius: calc(var(--s) * .27); background: var(--pic-bg, var(--slate, #dde2ea)); color: var(--pic-ink, var(--slate-ink, #3f4a66));
  box-shadow: inset 0 0 0 1px rgba(var(--tint, 27, 36, 64), .07); }
.pic b { font: 600 calc(var(--s) * .36)/1 var(--sans); letter-spacing: -.02em; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.pic.has-img { background: var(--surface-3, #d9dfe7); }
.pic.has-img b { visibility: hidden; }
.pic.has-img img { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pic img { transition: none; } }
.addon-act { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.addon-act .spinner { width: 10px; height: 10px; border-width: 1.5px; vertical-align: -1px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.cat-chips .chip { padding: 5px 12px; font-size: 13px; }
.cat-chips .chip.on { background: var(--ink-fill, #1b2440); color: #fff; border-color: var(--ink-fill, #1b2440); }
.known-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.known-card { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.known-card .kc-top { display: flex; gap: 12px; align-items: center; margin-bottom: 2px; }
.known-card .kc-top div { display: grid; gap: 1px; min-width: 0; }
.known-card .kc-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.known-card .kc-cat { color: var(--muted); font-size: 12px; }
.known-card p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.known-card .kc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.known-card .kc-foot small { color: var(--muted); font-size: 12px; }
.drop-veil { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(var(--glass-rgb, 245,248,252),.86); border: 2px dashed #3d9be9; border-radius: 18px; pointer-events: none; }
.drop-veil > div { display: grid; justify-items: center; gap: 6px; color: var(--text); }
.drop-veil b { font-size: 20px; }
.drop-veil span { color: var(--text-2); font-size: 14px; }
.addons-soon { display: grid; justify-items: center; gap: 6px; padding: 32px 16px; text-align: center; }
.addons-soon span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .add-box { align-items: flex-start; }
  .add-wisp { width: 40px; height: 40px; }
  .add-form { flex-direction: column; }
  .add-form input { flex: none; }
}

/* Plugins offered in the chat */
.install-card .pc-head svg { color: #3d9be9; }
.install-card .pc-items li { grid-template-columns: 26px 1fr; }

/* Saved chats */
.assistant.has-chats { grid-template-columns: 250px minmax(0, 1fr) 300px; }
.chats { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg-2); }
.chats-top .btn { width: 100%; justify-content: center; }
.chats-search { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--text); outline: none; }
.chats-search:focus { border-color: var(--sel-line, #b9d8f5); }
.chats-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; padding: 0 4px; }
.chats-group { padding: 12px 8px 4px; font: 600 11px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chat-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 8px; border-radius: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.chat-item:hover, .chat-item:focus-visible { background: rgba(var(--tint, 27, 36, 64),.05); }
.chat-item.on { background: var(--sel-bg, #d3e2f2); color: var(--text); font-weight: 500; }
.chat-item .ct { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .pin { color: #b98500; display: inline-flex; }
.chat-more { opacity: 0; border: 0; background: none; color: var(--muted); padding: 0 4px; font-size: 16px; line-height: 1; border-radius: 6px; }
.chat-item:hover .chat-more, .chat-item.on .chat-more, .chat-more:focus-visible { opacity: 1; }
.chat-more:hover { background: rgba(var(--tint, 27, 36, 64),.08); color: var(--text); }
.chat-rename { width: 100%; height: 26px; padding: 0 6px; border: 1px solid var(--sel-line, #b9d8f5); border-radius: 6px; font: inherit; }
.chats-empty { color: var(--muted); font-size: 13px; padding: 8px; margin: 0; }
.chats-arch { align-self: flex-start; font-size: 13px; padding: 4px 8px; }
.chat-menu { position: fixed; z-index: 95; min-width: 170px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-2); display: grid; }
.chat-menu button { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 8px; font-size: 13.5px; color: var(--text); text-align: left; }
.chat-menu button:hover { background: rgba(var(--tint, 27, 36, 64),.05); }
.chat-menu .danger { color: var(--bad); }
.chat-head { display: none; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chat-head b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The chat box tools */
.composer .tool { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 0; background: none; color: var(--text-2); cursor: pointer; }
.composer .tool:hover { background: rgba(var(--tint, 27, 36, 64),.06); color: var(--text); }
.composer .tool.on { background: var(--bad-bg, #ffe4e1); color: var(--bad-ink, #c0392b); }
.composer .hint { margin-left: 4px; }
.att-pending { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.att { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 6px 4px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.att > span:not(.spinner) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }
.att button { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 2px; }
.att .spinner { width: 10px; height: 10px; border-width: 1.5px; }
.att.up { opacity: .7; }
.att-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.m.user .att { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); color: #fff; }
.send.stop { background: #1b2440; }
.stop-sq { width: 11px; height: 11px; border-radius: 2px; background: var(--surface); }
.slash-menu { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px); z-index: 30; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-2); display: grid; }
.slash-menu button { display: flex; gap: 12px; align-items: baseline; padding: 8px 10px; border: 0; background: none; border-radius: 9px; text-align: left; font-size: 13.5px; color: var(--text-2); }
.slash-menu button b { font: 600 13px var(--mono); color: var(--text); min-width: 76px; }
.slash-menu button.on, .slash-menu button:hover { background: var(--sel-bg, #d3e2f2); }
.chat.dropping .thread { outline: 2px dashed #3d9be9; outline-offset: -10px; border-radius: 18px; }
/* Message actions */
.msg-acts { display: flex; gap: 2px; margin-top: 2px; opacity: 0; transition: opacity .15s; }
.m:hover .msg-acts, .msg-acts:focus-within { opacity: 1; }
.msg-acts button { display: inline-flex; gap: 4px; align-items: center; padding: 4px 6px; border: 0; background: none; border-radius: 6px; font-size: 12px; color: var(--muted); }
.msg-acts button:hover { background: rgba(var(--tint, 27, 36, 64),.06); color: var(--text); }
.m.user { flex-direction: column; align-items: flex-end; }
@media (hover: none) { .msg-acts { opacity: 1; } }
@media (max-width: 1240px) { .assistant.has-chats { grid-template-columns: 230px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .assistant.has-chats { grid-template-columns: minmax(0, 1fr); }
  .chats { position: fixed; z-index: 80; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--sh-2); }
  body.chats-open .chats { transform: none; }
  .chat-head { display: flex; }
}

/* The sidebar never spills off the screen: the menu scrolls, the usage card and account stay visible. */
.side { overflow: hidden; }
.nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; margin: 0 -4px; padding: 0 4px; }
.side-foot { margin-top: 0; flex: none; }
.user-row { min-width: 0; }
.user-row .who { flex: 1; min-width: 0; }
.user-row .who > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .logout { flex: none; font-size: 12.5px; }
@media (max-height: 760px) { .side { gap: 10px; } .usage { padding: 9px 12px; } .demo-note { display: none; } }

/* Modes */
.mode-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-right: auto; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.mode-btn:hover { border-color: var(--line-2); color: var(--text); }
.mode-btn .chev { font-size: 10px; color: var(--muted); }
.mode-btn.m-auto { background: var(--sel-bg, #dcebf8); border-color: var(--sel-line, #b9d3ec); color: var(--sel-ink, #1d5f99); }
.mode-btn.m-all { background: var(--warn-bg, #fbefc9); border-color: var(--warn-line, #efd789); color: var(--warn-ink, #7a5600); }
.mode-btn.m-plan { background: var(--vio-bg, #e4e0f6); border-color: var(--vio-line, #cbc3ec); color: var(--vio-ink, #4b3d99); }
.mode-menu { position: absolute; left: 8px; bottom: calc(100% + 8px); z-index: 31; width: min(420px, calc(100% - 16px)); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-2); display: grid; gap: 2px; }
.mm-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 8px; font-size: 12px; color: var(--muted); }
.mm-head b { font: 600 12px var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.mm-head kbd { padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); font-size: 11px; }
.mode-menu button { display: grid; grid-template-columns: 28px 1fr 20px; gap: 10px; align-items: start; padding: 10px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--text); }
.mode-menu button:hover { background: var(--surface-2); }
.mode-menu button.on { background: var(--ink-fill, #1b2440); color: #fff; }
.mode-menu button.on .mm-text span { color: #c9d1e3; }
.mm-ico { display: grid; place-items: center; height: 22px; }
.mm-text { display: grid; gap: 2px; }
.mm-text b { font-size: 14px; font-weight: 600; }
.mm-text span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mm-check { display: grid; place-items: center; height: 22px; }

/* The Studio */
.pro-tag { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--warn-bg, #fbefc9); color: var(--warn-ink, #7a5600); font: 600 10.5px var(--pixel); letter-spacing: .04em; }
.studio-title { display: flex; align-items: center; gap: 10px; }
.studio-title .pro-tag { margin-left: 0; font-size: 12px; padding: 3px 9px; }
.studio-quota { align-self: center; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.studio .panel-card { margin-top: 12px; }
.studio-wisp { width: 128px; height: 128px; flex: none; }
.studio-wisp.sm { width: 72px; height: 72px; }
.studio-hero { display: flex; gap: 22px; align-items: center; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-1); }
.sh-main { flex: 1; min-width: 0; display: grid; gap: 10px; }
.sh-main h2, .studio-upsell h2 { margin: 0; font: 600 24px var(--display); letter-spacing: -.02em; }
.sh-main textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 15px; color: var(--text); resize: vertical; outline: none; }
.sh-main textarea:focus { border-color: var(--sel-line, #b9d8f5); }
.sh-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sh-foot .c-chips { margin: 0; justify-content: flex-start; }
.studio-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.studio-item { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; color: var(--text); }
.studio-item:hover { border-color: var(--sel-line, #b9d8f5); }
.studio-item span { color: var(--text-2); font-size: 13.5px; }
.studio-item small, .studio-empty { color: var(--muted); font-size: 12.5px; }
.studio-empty { padding: 0 16px 16px; margin: 0; }
.studio-upsell, .studio-soon { display: flex; gap: 24px; align-items: center; padding: 26px; }
.studio-upsell p { margin: 8px 0 0; color: var(--text-2); max-width: 640px; }
.studio-steps { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 4px; }
.studio-soon { flex-direction: column; text-align: center; }
.studio-top { display: flex; gap: 16px; align-items: center; margin-top: 4px; }
.studio-top h2 { margin: 0; font: 600 26px var(--display); letter-spacing: -.02em; }
.studio-top p { margin: 2px 0 0; color: var(--text-2); max-width: 720px; }
.studio-top > span { margin-left: auto; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.spec-body { display: grid; gap: 16px; padding: 0 16px 16px; }
.spec-field { display: grid; gap: 6px; font-size: 13px; }
.spec-field > span { font: 600 11.5px var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.spec-field textarea, .spec-row input, .spec-row select { width: 100%; min-width: 0; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; color: var(--text); outline: none; }
.spec-field textarea { resize: vertical; font-size: 14px; }
.spec-row { display: grid; gap: 6px; margin-bottom: 6px; align-items: center; }
.spec-row.one { grid-template-columns: 1fr 24px; }
.spec-x { border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; border-radius: 6px; }
.spec-x:hover { color: var(--bad); background: rgba(var(--tint, 27, 36, 64),.05); }
.spec-field .link-btn { justify-self: start; font-size: 13px; }
.spec-note { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.spec-note.q { background: var(--warn-bg, #fbf1d2); }
.spec-note ul { margin: 4px 0 0; padding-left: 18px; }
.spec-foot { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.spec-ask { flex: 1; display: flex; gap: 6px; min-width: 220px; }
.spec-ask input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.ver { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ver.busy { background: var(--surface-2); }
.ver-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ver-top b { font: 600 15px var(--pixel); }
.ver-req { flex: 1; min-width: 0; color: var(--text-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver-top .badge .spinner { width: 10px; height: 10px; border-width: 1.5px; vertical-align: -1px; }
.ver-detail { margin: 0; color: var(--text-2); font-size: 13px; }
.ver-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ver-acts small { margin-left: auto; font-size: 12px; }
.studio-change { display: grid; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.studio-change textarea { width: 100%; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; resize: vertical; }
.studio-change .btn { justify-self: end; }
.studio-code { width: min(980px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.sc-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sc-head .icon-btn { margin-left: auto; }
.sc-tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.sc-tabs button { padding: 7px 12px; border: 0; border-radius: 8px 8px 0 0; background: none; font: 500 13px var(--mono); color: var(--text-2); white-space: nowrap; }
.sc-tabs button.on { background: #141b31; color: #e8ecf5; }
.sc-body { flex: 1; margin: 0; overflow: auto; padding: 14px 16px; background: #141b31; color: #c9d1e3; font: 12.5px/1.65 var(--mono); white-space: pre; }
.sc-body .ln { display: inline-block; width: 3.2em; color: #5b6580; user-select: none; }
.sc-body b { color: #ff9b8f; font-weight: 500; }
/* The Studio's workshop: watch a build live */
.studio-live { padding: 0; overflow: hidden; }
.ws-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ws-wisp { width: 44px; height: 44px; flex: none; }
.ws-title { display: grid; min-width: 0; }
.ws-title b { font: 600 16px var(--display); }
.ws-title small { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-time { margin-left: auto; font: 12.5px var(--mono); color: var(--muted); }
.ws-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ws-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.ws-steps li.done { color: var(--good); }
.ws-steps li.on { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.ws-steps li.fix { color: var(--warn); }
.ws-steps li.bad { color: var(--bad); }
.ws-steps .spinner, .ws-files li .spinner { width: 13px; height: 13px; border-width: 2px; flex: none; }
.ws-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); min-height: 320px; }
.ws-talk { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; }
.ws-feed { flex: 1; max-height: 360px; overflow-y: auto; padding: 12px 16px; display: grid; gap: 8px; align-content: start; }
.ws-msg { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; font-size: 13.5px; line-height: 1.45; color: var(--text); animation: ws-in .25s var(--ease); }
.ws-msg .ico { margin-top: 2px; color: var(--muted); }
.ws-msg small { color: var(--muted); font: 11.5px var(--mono); margin-top: 2px; }
.ws-msg.file, .ws-msg.plan { color: var(--text-2); }
.ws-msg.good .ico, .ws-msg.done .ico { color: var(--good); }
.ws-msg.done span { font-weight: 600; }
.ws-msg.warn .ico { color: var(--warn); }
.ws-msg.bad .ico, .ws-msg.bad span { color: var(--bad); }
.ws-msg.step .ico { color: var(--accent-2); }
.ws-msg.you { display: grid; grid-template-columns: none; justify-items: end; gap: 2px; }
.ws-msg.you span { max-width: 85%; padding: 7px 12px; border-radius: 14px 14px 4px 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ws-msg.you small { font-family: inherit; }
.ws-dot { width: 7px; height: 7px; margin: 6px 0 0 5px; border-radius: 50%; background: var(--accent-2); display: block; }
.ws-msg.typing { display: flex; gap: 4px; padding-left: 26px; }
.ws-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ws-dot 1.2s infinite ease-in-out; }
.ws-msg.typing i:nth-child(2) { animation-delay: .15s; } .ws-msg.typing i:nth-child(3) { animation-delay: .3s; }
.ws-note { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ws-note input { flex: 1; min-width: 0; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.ws-work { display: flex; flex-direction: column; min-width: 0; }
.ws-files { list-style: none; margin: 0; padding: 10px 14px; display: grid; gap: 4px; border-bottom: 1px solid var(--line); max-height: 150px; overflow-y: auto; }
.ws-files li { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.ws-files li b { font: 500 12.5px var(--mono); color: var(--text-2); }
.ws-files li small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-files li.done .ico { color: var(--good); }
.ws-files li.on b { color: var(--text); }
.ws-files .ws-dot { margin: 0 0 0 5px; background: var(--line); }
.ws-code { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #1d2333; }
.ws-code-head { display: flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 12.5px; color: #a3acbf; border-bottom: 1px solid rgba(255,255,255,.06); }
.ws-code-head b { color: #e6e9f0; font: 500 12.5px var(--mono); }
.ws-code pre { flex: 1; margin: 0; padding: 12px 14px; max-height: 300px; min-height: 200px; overflow: auto; font: 12.3px/1.6 var(--mono); color: #c9d1e3; white-space: pre; }
.ws-code pre.idle { flex: none; min-height: 0; white-space: pre-wrap; color: #8a93a8; font-family: inherit; font-size: 13px; }
.ws-code:has(pre.idle) { flex: none; }
.j-k { color: #d38bff; } .j-s { color: #6ee7b7; } .j-c { color: #7d879f; font-style: italic; } .j-a { color: #ffcb3d; }
.ws-caret { display: inline-block; width: 7px; height: 14px; margin-left: 1px; vertical-align: -2px; background: #ffcb3d; animation: ws-blink 1s steps(1) infinite; }
.ws-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.st-notes { margin: 0 16px 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.st-notes ul { margin: 6px 0 8px; padding: 0; list-style: none; display: grid; gap: 4px; }
.st-notes li { display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); }
@keyframes ws-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes ws-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes ws-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ws-msg, .ws-msg.typing i, .ws-caret { animation: none; } }
@media (max-width: 900px) { .ws-body { grid-template-columns: minmax(0, 1fr); } .ws-talk { border-right: 0; border-bottom: 1px solid var(--line); } .ws-feed { max-height: 260px; } }
@media (max-width: 1100px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .studio-hero, .studio-upsell { flex-direction: column; align-items: stretch; text-align: left; }
  .studio-wisp { width: 88px; height: 88px; align-self: center; }
  .studio-top { flex-wrap: wrap; } .studio-top > span { margin-left: 0; }
  .spec-row { grid-template-columns: 1fr 24px !important; }
}
.sc-head, .sc-tabs { flex: none; }
.spec-row textarea { width: 100%; min-width: 0; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; color: var(--text); outline: none; resize: none; field-sizing: content; min-height: 34px; line-height: 1.4; }

/* Live console */
.con-state { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--text-2); }
.con-state.good { background: var(--good-bg, #e3f6ec); color: var(--good-ink, #157a4a); }
.con-state.warn { background: var(--warn-bg, #fbefc9); color: var(--warn-ink, #7a5600); }
.con-state .spinner { width: 10px; height: 10px; border-width: 1.5px; }
.con-out .con-me { color: #ffcb3d; }
.con-out .con-err { color: #ff7b72; }

/* Live Overview: what the Wisp noticed, and real charts */
.wisp-notes { margin-bottom: 12px; }
.wisp-notes header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wn-title { display: inline-flex; align-items: center; gap: 8px; }
.wn-wisp { width: 28px; height: 28px; }
.wisp-notes header small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.wisp-notes header .spinner { width: 11px; height: 11px; border-width: 1.5px; }
.wn-empty { margin: 0; padding: 4px 16px 16px; font-size: 13.5px; }
.wn { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
.wn:first-child { border-top: 0; }
.wn-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--warn-bg, #fbefc9); color: var(--warn-ink, #7a5600); }
.wn.bad .wn-ico { background: var(--bad-bg, #fde4e1); color: var(--bad-ink, #a3271d); }
.wn.fixed .wn-ico { background: var(--good-bg, #e3f6ec); color: var(--good-ink, #157a4a); }
.wn.fixed .wn-body { opacity: .75; }
.wn-body b { font-weight: 600; font-size: 14.5px; }
.wn-body p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; max-width: 760px; }
.wn-body details { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.wn-body summary { cursor: pointer; width: fit-content; }
.wn-body pre { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font: 11.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
.wn-acts { display: flex; align-items: center; gap: 6px; }
.charts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-empty { margin: 0; padding: 60px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.nav-item .count.warn { background: var(--warn-bg, #fbefc9); color: var(--warn-ink, #7a5600); }
@media (max-width: 1100px) { .charts.three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .wn { grid-template-columns: 28px minmax(0, 1fr); } .wn-acts { grid-column: 2; } }

/* Live backups */
.bk-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px; border-radius: var(--r-box); border: 1px solid var(--line); background: var(--surface); }
.bk-banner > div { display: grid; gap: 2px; flex: 1; }
.bk-banner span { color: var(--text-2); font-size: 13.5px; }
.bk-banner.warn { background: var(--warn-bg, #fbefc9); border-color: var(--warn-line, #f0dc9c); color: var(--warn-ink, #7a5600); }
.bk-wisp { width: 36px; height: 36px; }
.bk-foot { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 10px 2px 0; }
.table .badge .spinner { width: 10px; height: 10px; border-width: 1.5px; }
@media (max-width: 700px) { #bk-rows .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; white-space: normal; } #bk-rows .actions .btn { padding-inline: 9px; } }

/* Live files */
.lf-tree { display: flex; flex-direction: column; gap: 8px; position: relative; }
.lf-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font: 12.5px var(--mono); color: var(--muted); padding: 2px 4px; }
.lf-crumbs button { width: auto; padding: 3px 5px; color: var(--text-2); }
.lf-tools { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 4px 4px; border-bottom: 1px solid var(--line); }
.lf-tools .btn { padding: 5px 9px; font-size: 12.5px; }
.lf-list { display: grid; gap: 1px; align-content: start; overflow-y: auto; flex: 1; }
.lf-row { display: flex; align-items: center; border-radius: var(--r-ctl); }
.lf-row:hover, .lf-row.on { background: rgba(var(--tint, 27, 36, 64),.05); }
.lf-row.on { box-shadow: inset 2px 0 0 var(--accent-2); }
.tree .lf-open { flex: 1; min-width: 0; }
.lf-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-open small { margin-left: auto; color: var(--muted); font-size: 11px; flex: none; }
.lf-acts { display: none; gap: 2px; padding-right: 4px; }
.lf-row:hover .lf-acts, .lf-row:focus-within .lf-acts { display: flex; }
.lf-acts .icon-btn { width: 26px; height: 26px; }
.tree .lf-acts button { width: 26px; padding: 0; justify-content: center; }
.lf-empty { padding: 8px; margin: 0; font-size: 13px; }
.lf-drop { display: none; position: absolute; inset: 8px; margin: 0; border: 2px dashed var(--accent-2); border-radius: 12px; background: rgba(255,203,61,.08); align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; color: var(--text); font-size: 13.5px; pointer-events: none; }
.lf-tree.drag .lf-drop { display: flex; }
.lf-head .lf-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-dirty { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-left: 4px; vertical-align: 1px; }
.lf-problems, .lf-restart { display: flex; align-items: flex-start; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; background: var(--warn-bg, #fbefc9); color: var(--warn-ink, #5c4300); }
.lf-problems.bad { background: var(--bad-bg, #fde4e1); color: var(--bad-ink, #7d1f17); }
.lf-problems > div { flex: 1; } .lf-problems p { margin: 0; }
.lf-restart { align-items: center; background: var(--good-bg, #e3f6ec); color: var(--good-ink, #135c39); }
.lf-restart span { flex: 1; }
.lf-editor { flex: 1; display: grid; grid-template-columns: 52px minmax(0, 1fr); min-height: 0; background: var(--surface); }
.lf-gutter { overflow: hidden; padding: 14px 0; font: 13px/1.75 var(--mono); color: #b3bccd; text-align: right; user-select: none; border-right: 1px solid var(--line); }
.lf-gutter span { display: block; padding-right: 12px; }
.lf-gutter span.bad { color: var(--bad); font-weight: 600; background: rgba(255,123,114,.12); }
.lf-code { position: relative; overflow: hidden; min-height: 0; }
.lf-hl, .lf-code textarea { margin: 0; padding: 14px 18px; font: 13px/1.75 var(--mono); white-space: pre; tab-size: 2; border: 0; }
.lf-hl { position: absolute; inset: 0 auto auto 0; min-width: 100%; pointer-events: none; color: var(--text); }
.lf-hl span { display: inline; }
.lf-code textarea { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; outline: none; background: transparent; color: transparent; caret-color: var(--text); overflow: auto; }
.lf-code textarea::selection { background: rgba(255,203,61,.35); color: transparent; }
.lf-hl .c { color: #6b7590; } .lf-hl .k { color: #b7791f; } .lf-hl .v { color: #1d7a5a; } .lf-hl .s { color: #b4532a; } .lf-hl .n { color: #2b6cb0; }
.lf-history { border-top: 1px solid var(--line); max-height: 40%; overflow-y: auto; padding: 10px 18px 14px; background: var(--surface-2); }
.lf-history header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.lf-history header small { color: var(--muted); font-size: 12px; }
.lf-ver { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.lf-ver span { flex: 1; }
.lf-empty-view { margin: auto; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 30px; color: var(--text-2); max-width: 440px; }
.lf-empty-view p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.lf-wisp { width: 72px; height: 72px; }
@media (max-width: 800px) {
  .view.on.files { display: flex; flex-direction: column; height: auto; min-height: 100%; }
  .lf-tree { border-right: 0; border-bottom: 1px solid var(--line); flex: none; max-height: none; }
  .lf-list { flex: none; max-height: 42vh; }
  .files .viewer { flex: none; min-height: 70vh; }
  .lf-acts { display: flex; }
}
.tree .lf-tools .btn { width: auto; justify-content: center; font-family: var(--sans); }

/* Live players */
.pl-head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pl-switch .sw { width: 28px; height: 16px; border-radius: 999px; background: var(--line-2, #c9d1de); position: relative; transition: background .2s; }
.pl-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.pl-switch.on .sw { background: var(--good); }
.pl-switch.on .sw::after { transform: translateX(12px); }
.pl-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 10px; }
.pl-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-filters button { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; }
.pl-filters button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.pl-filters .n { font-size: 11.5px; opacity: .7; }
.pl-filters .n:empty { display: none; }
#pl-q { padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-width: 200px; font-size: 13.5px; }
.pl-table .name { display: flex; align-items: center; gap: 10px; }
.pl-who { display: grid; gap: 3px; }
.pl-who b { font-weight: 600; color: var(--text); }
.pl-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-tags .badge { font-size: 11px; padding: 1px 7px; }
.pl-reason { font-size: 12px; }
.pl-more { font-size: 18px; line-height: 1; }
.pl-menu { position: absolute; z-index: 60; min-width: 200px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 34px -10px rgba(27,36,64,.3); display: grid; }
.pl-menu button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--text); font-size: 13.5px; }
.pl-menu button:hover, .pl-menu button:focus-visible { background: var(--surface-2); outline: none; }
.pl-menu button.danger { color: var(--bad); }
.pb-label { display: block; font-size: 13px; color: var(--text-2); margin: 4px 0 6px; }
#pb-in { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
@media (max-width: 700px) { #pl-q { min-width: 0; width: 100%; } .pl-table .actions { white-space: normal; } }

/* Live integrations */
.in-group { margin-bottom: 18px; }
.in-group h2 { font: 600 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.in-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.in-tile { padding: 16px; display: grid; gap: 8px; align-content: start; }
.in-tile p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.in-tile small { font-size: 12px; }
.in-tile.soon { opacity: .78; }
.in-tile-head, .in-card-head { display: flex; align-items: center; gap: 10px; }
.in-tile-head b, .in-card-head b { font-weight: 600; }
.in-tile-head .btn, .in-tile-head .badge { margin-left: auto; }
.in-logo { position: relative; overflow: hidden; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.in-logo .in-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.in-logo.has-img { background: var(--surface-3, #d9dfe7); }
.in-logo.has-img > :not(.in-pic) { visibility: hidden; }
.in-logo.has-img .in-pic { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .in-logo .in-pic { transition: none; } }
.in-discord, .in-discord_bot { background: #5865f2; color: #fff; }
.in-telegram { background: #26a5e4; color: #fff; }
.in-kofi { background: #ff5e5b; color: #fff; }
.in-patreon { background: #1b1b1b; color: #fff; }
.in-slack { background: #4a154b; color: #fff; }
.in-tebex { background: #0d1b1d; }
.in-list { display: grid; gap: 12px; }
.in-card { padding: 16px; display: grid; gap: 12px; }
.in-card-head > div { display: grid; gap: 2px; min-width: 0; }
.in-card-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.in-card-head .badge { margin-left: auto; }
.in-error { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg, #fbefc9); color: var(--warn-ink, #5c4300); font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.in-sub { display: grid; gap: 6px; }
.in-sub > b { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.in-sub p { margin: 0; font-size: 13.5px; }
.in-events { display: flex; flex-wrap: wrap; gap: 6px; }
.in-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.in-chip input { margin: 0; accent-color: var(--accent-2); }
.in-chip:has(input:checked) { border-color: var(--accent-2); background: rgba(255,203,61,.12); color: var(--text); }
.in-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.in-copy { display: flex; gap: 6px; }
.in-copy input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font: 12.5px var(--mono); }
.in-toggle { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.in-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.in-steps li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
.in-steps li.done { color: var(--text); } .in-steps li.done > .ico:first-child { color: var(--good); }
.in-sales td { padding: 7px 10px; font-size: 13px; }
.in-activity { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.in-act { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; font-size: 13px; color: var(--text-2); align-items: start; }
.in-act .ico { color: var(--good); margin-top: 2px; } .in-act.bad .ico { color: var(--bad); }
.in-act time { color: var(--muted); font-size: 12px; }
.in-modal { width: min(520px, 100%); }
.in-modal h3 { display: flex; align-items: center; gap: 10px; }
.in-field { display: grid; gap: 4px; margin: 12px 0 0; }
.in-field > span { font-size: 13px; font-weight: 500; }
.in-field input { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.in-field small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.in-note { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.in-err { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--bad-bg, #fde4e1); color: var(--bad-ink, #7d1f17); font-size: 13px; }
.in-chip input, .in-toggle input { height: auto; width: auto; padding: 0; border: 0; background: none; }

/* Extras on the Integrations page */
.in-step { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--text-2); }
.in-help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.in-help.muted { color: var(--muted); }
.in-opt { align-items: flex-start; margin-top: 10px; }
.in-opt input { margin-top: 3px; }
.in-geyser { background: #3b8526; color: #fff; }
.in-voicechat { background: #2f6fde; color: #fff; }
.in-bluemap { background: #1f6fb2; color: #fff; }

/* Paste a modpack link: on the wizard's first step, and the card the chat answers with */
.wiz-link { display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin: 22px auto 0; padding: 14px 16px; text-align: left;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); backdrop-filter: blur(6px); }
.wiz-link label { color: var(--text); font-size: 13.5px; font-weight: 500; }
.wiz-link-row { display: flex; gap: 8px; }
.wiz-link-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font: inherit; }
.wiz-link-row input:focus { outline: none; border-color: var(--sel-line, #b9d8f5); box-shadow: 0 0 0 4px rgba(61,155,233,.15); }
.wiz-link small { color: var(--text-2, var(--text)); font-size: 13px; line-height: 1.45; }
.wiz-link small:empty { display: none; }
.pack-card { margin-top: 10px; }
.pack-card .pc-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pack-card > p { margin: 0; padding: 12px 16px 0; font-size: 13.5px; }
.pack-card .pc-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
@media (max-width: 560px) { .wiz-link-row { flex-direction: column; } }
