#workspace[data-page="terminal"] #page-description { display: none; }
#workspace[data-page="terminal"] { height: 100dvh; min-height: 0; }
#workspace[data-page="terminal"] .main-shell { height: 100%; display: flex; flex-direction: column; }
#workspace[data-page="terminal"] .topbar { flex-shrink: 0; }
#workspace[data-page="terminal"] main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 22px;
}
#workspace[data-page="terminal"] main > :not(#content) { flex-shrink: 0; }
#workspace[data-page="terminal"] #content,
#workspace[data-page="terminal"] #terminal-host { display: flex; flex: 1; min-height: 0; }
#workspace[data-page="terminal"] footer { margin-top: 12px; padding: 12px 0; }
.terminal-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e1e6da;
  border-radius: 18px;
  background: #f8faf7;
  color: #263e38;
}
.terminal-heading { flex-shrink: 0; padding: 16px 20px; border-bottom: 1px solid #dce5dd; }
.terminal-heading h2 { margin: 0; font-size: 24px; }
.terminal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 14px 20px 16px; }
.terminal-body > :not(#terminal-display) { flex-shrink: 0; }
#terminal-display { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.terminal-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 12px 12px 0 0;
  background: #21443e;
  color: #d8e9df;
  font-size: 12px;
  letter-spacing: 1px;
}
.terminal-actions { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; margin-left: auto; }
.terminal-toolbar .secondary { padding: 8px 14px; min-height: 34px; letter-spacing: normal; }
.terminal-screen-frame {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 10px;
  border-radius: 0 0 12px 12px;
  background: #132c29;
  overflow: hidden;
}
#terminal-screen { flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: #132c29; color-scheme: dark; }
#terminal-screen .xterm { height: 100%; }
#terminal-screen .xterm-viewport { background: #132c29; scrollbar-width: none; }
#terminal-screen .xterm-viewport::-webkit-scrollbar { display: none; width: 0; }
#terminal-screen .xterm-scrollable-element > .scrollbar { display: none; }
.terminal-keys { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.terminal-keys .secondary { padding: 6px 12px; min-height: 34px; }
.terminal-keys .secondary:disabled { cursor: not-allowed; }
#terminal-status:empty,
#terminal-error:empty { display: none; }
#terminal-error { color: #a33b32; font-size: 14px; margin: 0 0 12px; line-height: 1.6; }
#terminal-status { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #47695b; overflow-wrap: anywhere; }
.terminal-help { margin-top: 12px; color: #728278; font-size: 12px; }
.terminal-help summary { cursor: pointer; width: fit-content; }
.terminal-help p { margin: 8px 0 0; line-height: 1.7; max-height: 70px; overflow-y: auto; }
@media (max-width: 600px) {
  .terminal-panel { border-radius: 16px; }
  .terminal-heading { padding: 14px; }
  .terminal-heading h2 { font-size: 21px; }
  .terminal-body { padding: 12px 14px 14px; }
  .terminal-toolbar { padding: 6px 10px; gap: 8px; }
  .terminal-toolbar .secondary { padding: 8px 10px; }
  .terminal-screen-frame { padding: 6px; }
  .terminal-keys { gap: 8px; }
  .terminal-keys .secondary { min-height: 38px; }
}
@media (max-height: 650px) {
  #workspace[data-page="terminal"] main { padding-top: 12px; }
  #workspace[data-page="terminal"] .page-heading { margin-bottom: 12px; }
  #workspace[data-page="terminal"] #page-kicker { display: none; }
  .terminal-heading { padding: 10px 16px; }
  .terminal-heading h2 { font-size: 20px; }
  .terminal-body { padding: 10px 14px; }
  .terminal-keys, .terminal-help { margin-top: 8px; }
}
