/* Additive waveguide display: pure black is transparent, so keep the
   background black and everything else bright and high-contrast. */
:root {
  --bg: #000;
  --text: #f5f5f5;
  --dim: #9aa0a6;
  --accent: #ff9a6b;
  --focus: #7fd4ff;
  --panel: #1c1c1c;
  --error: #ff7b7b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  padding: 20px 28px 24px;
  gap: 12px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 26px;
  height: 40px;
  flex: none;
}
.brand { font-weight: 700; }
.mark { color: var(--accent); }
.status { color: var(--dim); font-size: 22px; }
.status.busy { color: var(--accent); }
.status.error { color: var(--error); }

main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.welcome { padding-top: 60px; text-align: center; }
.welcome .big { font-size: 40px; font-weight: 600; margin: 0 0 28px; }
.welcome .hint { font-size: 24px; color: var(--dim); margin: 10px 0; }

.exchange { height: 100%; overflow: hidden; }
.question {
  color: var(--dim);
  font-size: 22px;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.answer {
  font-size: 29px;
  line-height: 39px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  /* height is set in JS to a whole number of lines */
  overflow: hidden;
}
.answer.error { color: var(--error); }
.cursor::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.more {
  flex: none;
  text-align: center;
  font-size: 20px;
  color: var(--accent);
  height: 24px;
  margin-top: -8px;
}

footer {
  display: flex;
  gap: 12px;
  height: 88px;
  flex: none;
}

.focusable {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 3px solid #444;
  border-radius: 22px;
  outline: none;
}
.focusable:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(127, 212, 255, 0.35);
}

textarea {
  flex: 1;
  height: 88px;
  resize: none;
  padding: 24px 22px;
  font-size: 28px;
  line-height: 1.2;
  overflow: hidden;
}
textarea::placeholder { color: var(--dim); }

.icon {
  width: 76px;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.icon .ico { font-size: 30px; line-height: 1; }
.icon .lbl { font-size: 18px; font-weight: 600; line-height: 1.1; }
.icon[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.icon:focus { border-color: var(--focus); }

/* --- Apps Claude built ---------------------------------------------------- */
.open-app {
  flex: none;
  height: 88px;
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  border-color: var(--accent);
  cursor: pointer;
}

.apps-view { height: 100%; }
.app-list {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-row { display: flex; gap: 12px; flex: none; }
.app-open {
  flex: 1;
  min-width: 0; /* let the description ellipsis instead of pushing ✕ off screen */
  min-height: 88px;
  text-align: left;
  padding: 10px 20px;
  cursor: pointer;
}
.app-open .title { display: block; font-size: 28px; font-weight: 600; }
.app-open .desc {
  display: block;
  font-size: 20px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-delete { width: 88px; font-size: 30px; cursor: pointer; flex: none; }
.app-delete.confirm { width: 150px; font-size: 22px; color: var(--error); border-color: var(--error); }
