.window {
  position: relative; background: var(--term, #222436); border-radius: 16px; overflow: hidden;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .14), 0 0 0 .5px rgba(0, 0, 0, .55), 0 12px 32px rgba(0, 0, 0, .22), 0 32px 80px -12px rgba(0, 0, 0, .34);
}
:root:not([data-theme="dark"]) .window { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .22), 0 10px 28px rgba(15, 17, 30, .12), 0 30px 70px -14px rgba(15, 17, 30, .22); }
.titlebar {
  height: 32px; display: flex; align-items: center; justify-content: center; position: relative;
  background: var(--term, #222436); color: color-mix(in srgb, var(--term-fg, #c8d3f5) 72%, var(--term, #222436));
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; letter-spacing: -.005em; user-select: none;
}
.lights { position: absolute; left: 10px; top: 9.5px; display: flex; gap: 10px; }
.lights i { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.screen { position: relative; padding: 2px 10px 6px; outline: none; cursor: text; min-height: 200px; }
.screen canvas { display: block; }
.cursor { position: absolute; background: #c8d3f5; mix-blend-mode: difference; pointer-events: none; }
.loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 14px var(--mono); color: #636da6; letter-spacing: .02em;
}
.loading::after { content: ""; display: inline-block; width: .6em; height: 1.1em; background: #636da6; margin-left: .4em; vertical-align: middle; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.keycap {
  position: absolute; right: 22px; bottom: 44px; pointer-events: none;
  font: 600 22px/1 var(--mono); color: #c8d3f5; background: #2f334d;
  padding: 12px 16px 14px; min-width: 52px; text-align: center; border-radius: 10px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.35), 0 0 0 1px #3b4261, 0 10px 30px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .35s, transform .35s;
}
.keycap.on { opacity: 1; transform: none; transition: opacity .06s, transform .12s cubic-bezier(.2,.9,.3,1.3); }
@media (max-width: 640px) { .keycap { display: none; } }

.langs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; }
.langs button { font: 600 14px/1 var(--body); border: 0; border-radius: 999px; padding: 9px 14px; cursor: pointer; background: none; transition: background .2s, color .2s; }

