html, body {
  margin: 0;
  height: 100%;
  background: #a8a8a8;
  overflow: hidden;
  font-family: "Monaco", "Menlo", "Consolas", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.35;
}

.window {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 100vw);
  height: 100vh;
  height: var(--app-height, 100dvh);
  background: #fff;
  color: #000;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-size: 16px;
}

@media (min-width: 760px) {
  .window {
    margin-top: 24px;
    height: calc(100vh - 48px);
    height: calc(var(--app-height, 100dvh) - 48px);
  }
}

@media (max-width: 759px) {
  .window {
    border: 0;
    box-shadow: none;
    width: 100%;
  }
}

.titlebar {
  position: relative;
  height: 22px;
  flex: none;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(to bottom, #000 0 1px, #fff 1px 3px);
}

.title {
  background: #fff;
  padding: 0 8px;
  font-weight: bold;
  font-size: 14px;
}

.closebox {
  position: absolute;
  left: 8px;
  top: 5px;
  width: 11px;
  height: 11px;
  border: 1px solid #000;
  background: #fff;
  box-sizing: border-box;
}

.transcript {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 10px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 1.35em;
}

.line.echo {
  color: #000;
}

.prompt-line {
  position: relative;
  display: flex;
  align-items: baseline;
  margin: 0;
  white-space: pre-wrap;
}

#prompt-input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0.01;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-family: inherit;
  font-size: 16px;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background: #000;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
