:root{
  --bg0:#05060a;
  --bg1:#070a12;
  --panel:#0b1020;
  --panel2:#0a0f1b;
  --ink:#c9f5d5;
  --inkDim:#80c8a3;
  --accent:#6df7a8;
  --accent2:#7aa7ff;
  --warn:#ffd166;
  --danger:#ff6b6b;
  --accentSoft: rgba(109,247,168,0.12);
  --accent2Soft: rgba(122,167,255,0.12);
  --grid:rgba(160,255,200,0.06);
  --shadow:rgba(0,0,0,0.45);
  --radius:16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --muted: var(--inkDim);
  --hint: var(--muted);
  --ghost: var(--muted);
  --inkSoft: rgba(201,245,213,0.92);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--bg0);
  overflow:hidden;
}

.wrap{
  height:100%;
  display:flex;
  flex-direction:column;
  padding:0;
  gap:0;
}

.main{
  flex:1;
  min-height:0;
  display:flex;
}

.terminal{
  height:100%;
  display:flex;
  flex:1;
}

.screen{
  background:var(--bg0);
  border:none;
  border-radius:0;
  box-shadow:none;
  padding:16px;
  display:flex;
  flex:1;
  flex-direction:column;
  min-height:0;
  position:relative;
  overflow:hidden;
}
.boot pre{
  margin:0 0 6px 0;
  color:var(--accent);
  text-shadow:0 0 14px currentColor;
}

.bootLine{margin:0 0 10px 0; color:var(--muted)}

.history{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:8px 4px;
  font-family:var(--mono);
  font-size:13.5px;
  line-height:1.4;
}

.history::-webkit-scrollbar{width:10px}
.history::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.08); border-radius:999px}

.line{white-space:pre-wrap; word-break:break-word; margin:0}
.ok{color:var(--accent)}
.warn{color:var(--warn)}
.err{color:var(--danger)}
.mono{font-family:var(--mono)}
.termLink{
  color:var(--accent);
  text-decoration:none;
  border-bottom:1px dotted currentColor;
}
.termLink:hover{border-bottom-color:var(--accent)}
.promptRow{
  display:flex;
  align-items:baseline;
  gap:10px;
  padding-top:0;
  font-family:var(--mono);
  font-size:inherit;
  line-height:inherit;
  margin:0;
  margin-top:-1px;
}

.prompt{color:var(--accent)}

.promptLine{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-size:inherit;
  line-height:inherit;
}

.cmdText{
  flex:1;
  min-width:0;
  white-space:pre-wrap;
  word-break:break-word;
}

.cmdWrap{
  position:relative;
  flex:1;
  min-width:0;
  font:inherit;
  line-height:inherit;
}

input.cmd{
  width:100%;
  background:transparent;
  border:none;
  outline:none;
  color:var(--ink);
  font:inherit;
  line-height:inherit;
  height:1.4em;
  padding:0;
  position:relative;
  z-index:2;
  margin:0;
}

.hint{
  color:var(--hint);
  font-size:12px;
  opacity:0.55;
}

.ghost{
  position:absolute;
  inset:0;
  pointer-events:none;
  font:inherit;
  line-height:inherit;
  white-space:pre;
  color:var(--ghost);
  z-index:1;
  display:none;
  align-items:baseline;
  transform:translateY(0.5px);
  opacity:0.45;
}

.ghostTyped{color:transparent}
.ghostRest{color:inherit}

.viewer{
  background:linear-gradient(180deg, rgba(8,12,24,0.92), rgba(5,7,14,0.86));
  border:1px solid rgba(255,255,255,0.06);
  border-radius:var(--radius);
  box-shadow:0 22px 90px var(--shadow);
  min-height:0;
  overflow:hidden;
  display:flex;
  flex:1;
  flex-direction:column;
}

.viewerTop{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.viewerTitle{font-family:var(--mono); font-weight:700}
.viewerMeta{font-family:var(--mono); color:var(--muted); font-size:12px}

.viewerBody{
  padding:14px;
  overflow:auto;
}

.viewerBody::-webkit-scrollbar{width:10px}
.viewerBody::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.08); border-radius:999px}

.card{
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:14px;
  padding:12px 12px;
  margin-bottom:12px;
}

.cardTitle{font-family:var(--mono); font-weight:700; margin-bottom:6px}
.cardContent{color:var(--inkSoft)}
.muted{color:var(--muted)}

code{font-family:var(--mono); color:var(--accent); background:var(--accentSoft); padding:1px 6px; border-radius:8px;}

.bullets{margin:8px 0 0 18px; padding:0}
.bullets li{margin:6px 0}

.kv{display:grid; grid-template-columns: 110px 1fr; gap:8px; font-family:var(--mono); font-size:12.8px}
.kv div:nth-child(odd){color:var(--muted)}

.pills{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
.pill{font-family:var(--mono); font-size:11.5px; padding:4px 8px; border-radius:999px; border:1px solid rgba(255,255,255,0.08); background:var(--accentSoft); color:var(--ink)}

.actions{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.btn{
  font-family:var(--mono);
  font-size:12.8px;
  border-radius:12px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,0.08);
  background:var(--accent2Soft);
  color:var(--ink);
  cursor:pointer;
  text-decoration:none;
}
.btn:hover{filter:brightness(1.12)}

.searchRow{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  margin-bottom:12px;
}

.searchRow input, .searchRow select{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  padding:8px 10px;
  color:var(--ink);
  font-family:var(--mono);
  outline:none;
}

.progressWrap{
  height:8px;
  background:rgba(255,255,255,0.06);
  border-radius:999px;
  overflow:hidden;
  margin-top:8px;
}

.progressBar{
  height:100%;
  width:0%;
  background:linear-gradient(90deg, var(--accent), var(--accent2));
}

.deckNav{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between;
}

.deckBtns{display:flex; gap:8px; flex-wrap:wrap}

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

@media (max-width: 980px){
  .grid2{grid-template-columns:1fr}
}

.sim{
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:14px;
  padding:12px;
}

.sim .big{
  font-family:var(--mono);
  font-size:14px;
  margin-bottom:8px;
}

.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:8px 6px;
}

/* Themes */

body.theme-studio{
  --accent:#6df7a8;
  --accent2:#7aa7ff;
  --muted:#80c8a3;
  --hint: var(--muted);
  --ghost: var(--muted);
  --accentSoft: rgba(109,247,168,0.12);
  --accent2Soft: rgba(122,167,255,0.12);
  --inkSoft: rgba(201,245,213,0.92);
}

body.theme-lab{
  --accent:#ffd166;
  --accent2:#ff6b6b;
  --ink:#fff2cc;
  --inkDim:#ffdca3;
  --muted:#e2c089;
  --hint: var(--muted);
  --ghost: var(--muted);
  --accentSoft: rgba(255,209,102,0.16);
  --accent2Soft: rgba(255,107,107,0.14);
  --inkSoft: rgba(255,242,204,0.92);
  --grid:rgba(255,209,102,0.06);
}

body.theme-ember{
  --accent:#ff6b3d;
  --accent2:#ffb347;
  --ink:#ffe7d7;
  --inkDim:#f2b9a0;
  --muted:#d7a38d;
  --hint: var(--muted);
  --ghost: var(--muted);
  --accentSoft: rgba(255,107,61,0.16);
  --accent2Soft: rgba(255,179,71,0.16);
  --inkSoft: rgba(255,231,215,0.92);
  --grid:rgba(255,107,61,0.08);
  --bg0:#120804;
  --bg1:#1a0a05;
}

body.theme-ocean{
  --accent:#4fd1c5;
  --accent2:#63b3ed;
  --ink:#d8f4ff;
  --inkDim:#9fd0e6;
  --muted:#8ebbd4;
  --hint: var(--muted);
  --ghost: var(--muted);
  --accentSoft: rgba(79,209,197,0.16);
  --accent2Soft: rgba(99,179,237,0.16);
  --inkSoft: rgba(216,244,255,0.92);
  --grid:rgba(79,209,197,0.08);
  --bg0:#051218;
  --bg1:#06151d;
}

body.theme-sand{
  --accent:#e7c35a;
  --accent2:#f2a65a;
  --ink:#fff3cc;
  --inkDim:#e9d8a6;
  --muted:#d3c08d;
  --hint: var(--muted);
  --ghost: var(--muted);
  --accentSoft: rgba(231,195,90,0.16);
  --accent2Soft: rgba(242,166,90,0.16);
  --inkSoft: rgba(255,243,204,0.92);
  --grid:rgba(231,195,90,0.08);
  --bg0:#0f0c05;
  --bg1:#141004;
}

body.theme-rgb{
  --hue:0;
  --accent:hsl(var(--hue) 85% 60%);
  --accent2:hsl(var(--hue) 85% 70%);
  --warn:hsl(var(--hue) 85% 72%);
  --danger:hsl(var(--hue) 90% 55%);
  --accentSoft:hsl(var(--hue) 85% 60% / 0.16);
  --accent2Soft:hsl(var(--hue) 85% 70% / 0.16);
  --ink:hsl(var(--hue) 70% 92%);
  --inkDim:hsl(var(--hue) 40% 70%);
  --muted:hsl(var(--hue) 35% 60%);
  --hint:hsl(var(--hue) 35% 60%);
  --ghost:hsl(var(--hue) 35% 60%);
  --inkSoft:hsl(var(--hue) 70% 92% / 0.92);
  --bg0:hsl(var(--hue) 40% 6%);
  --bg1:hsl(var(--hue) 40% 8%);
  --panel:hsl(var(--hue) 35% 10%);
  --panel2:hsl(var(--hue) 35% 9%);
  --grid:hsl(var(--hue) 70% 70% / 0.08);
}


