.icon.assistant-icon { background: none; object-fit: contain; }

.window[data-app="assistant"] .window-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.assistant-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--silver);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}

.assistant-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
  padding: 0 2px 9px;
  border-bottom: 1px solid #808080;
  box-shadow: 0 1px #fff;
}

.assistant-avatar-frame {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  padding: 6px;
  background: #fff;
  box-shadow: var(--inset);
}

.assistant-avatar {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}

.assistant-identity { min-width: 0; }
.assistant-identity h2 { margin: 0 0 2px; color: var(--navy); font-size: 22px; line-height: 1.4; }
.assistant-identity p { margin: 0 0 5px; color: #444; font-size: 12px; line-height: 1.6; }
.assistant-connection { display: flex; gap: 6px; align-items: center; color: #555; font-size: 12px; line-height: 1.6; }
.assistant-status-light { width: 8px; height: 8px; flex-shrink: 0; background: #808080; border: 1px solid #444; box-shadow: inset 1px 1px #bbb; }
.assistant-connected .assistant-status-light { background: #008040; border-color: #004020; box-shadow: inset 1px 1px #80c89c; }

.assistant-log {
  flex: 1;
  min-width: 0;
  min-height: 100px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 15px;
  background: var(--paper, #fffff2);
  box-shadow: var(--inset);
  overflow-wrap: anywhere;
}

.assistant-log:focus-visible { outline: 1px dotted #111; outline-offset: -5px; }
.assistant-welcome { padding: 0 0 5px; }
.assistant-message-author { display: block; font-size: 12px; color: var(--navy); line-height: 1.6; margin: 0 0 4px; }
.assistant-greeting { font-size: 20px; line-height: 1.5; }
.assistant-welcome p { margin: 3px 0 7px; }
.assistant-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.assistant-shortcuts .retro-button { min-height: 34px; padding: 7px 12px; font-size: 12px; }
.assistant-message { margin-top: 18px; padding-top: 12px; border-top: 1px dotted #bbbba6; }
.assistant-message-user .assistant-message-author { color: #555; }
.assistant-message-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.assistant-message[data-assistant-pending] { color: #555; }

.assistant-compose { flex-shrink: 0; margin: 0; min-width: 0; }
.assistant-feedback { min-height: 20px; margin-bottom: 7px; font-size: 12px; line-height: 1.6; color: #555; overflow-wrap: anywhere; }
.assistant-feedback-error { color: #900000; }
.assistant-input-label { display: block; min-width: 0; font-size: 12px; color: #444; }
.assistant-input-label > span { display: block; margin-bottom: 5px; }
.assistant-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 76px;
  min-height: 60px;
  max-height: 140px;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: var(--inset);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  resize: vertical;
  overflow-wrap: anywhere;
}
.assistant-input::placeholder { color: #777; opacity: 1; }
.assistant-input:disabled { background: #dedede; color: #666; opacity: 1; -webkit-text-fill-color: #666; }
.assistant-input:focus-visible { outline: 1px dotted #111; outline-offset: -5px; }
.assistant-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.assistant-input-hint { font-size: 12px; line-height: 1.6; color: #555; }
.assistant-compose-actions { display: flex; gap: 8px; margin-left: auto; }
.assistant-compose-actions .retro-button { min-width: 68px; padding: 7px 14px; font-size: 16px; }
.assistant-session-note { margin-top: 5px; font-size: 12px; color: #555; line-height: 1.5; }

@media (max-width: 700px) {
  .assistant-shell { padding: 10px; gap: 9px; }
  .assistant-header { gap: 11px; padding-bottom: 8px; }
  .assistant-avatar-frame { width: 68px; height: 68px; padding: 6px; }
  .assistant-avatar { width: 56px; height: 56px; }
  .assistant-identity h2 { font-size: 20px; }
  .assistant-log { padding: 13px; }
  .assistant-shortcuts { gap: 6px; }
  .assistant-shortcuts .retro-button { padding-inline: 10px; }
  .assistant-input { height: 76px; max-height: 110px; resize: none; }
  .assistant-compose-footer { gap: 6px; }
  .assistant-compose-actions .retro-button { min-width: 62px; padding-inline: 12px; }
}

@media (max-height: 560px) {
  .assistant-header { gap: 9px; padding-bottom: 6px; }
  .assistant-avatar-frame { width: 48px; height: 48px; padding: 4px; }
  .assistant-avatar { width: 40px; height: 40px; }
  .assistant-identity h2 { font-size: 16px; }
  .assistant-identity p { display: none; }
  .assistant-shell { padding: 8px; gap: 7px; }
  .assistant-log { min-height: 55px; padding: 10px; }
  .assistant-feedback { margin-bottom: 4px; }
  .assistant-input { height: 60px; min-height: 48px; }
  .assistant-input-label > span, .assistant-session-note { display: none; }
}
