.assistant-island[hidden],
.assistant-pet[hidden] {
  display: none !important;
}

.assistant-attachment-menu {
  position: absolute;
  z-index: 20;
  left: 0;
  bottom: 59px;
  width: 174px;
  padding: 7px;
  border: 1px solid #e2e2de;
  border-radius: 18px;
  background: rgba(250, 250, 248, .98);
  box-shadow: 0 15px 38px rgba(35, 35, 30, .15);
  display: grid;
  gap: 4px;
}

.assistant-attachment-menu[hidden] { display: none !important; }
.assistant-attachment-menu button {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 8px;
  align-items: center;
  height: 47px;
  padding: 6px 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #4d4d49;
  text-align: left;
}
.assistant-attachment-menu button:hover { background: #eeeeea; }
.assistant-attachment-menu button > span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #e8e8e4;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.assistant-attachment-menu strong { align-self: end; font-size: 8px; }
.assistant-attachment-menu small { align-self: start; margin-top: 2px; color: #999; font-size: 6px; }
.assistant-attachment-menu button.recording > span { background: #292927; color: #fff; }
.assistant-composer.attachment-open > #assistantAddImage { background: #292927; color: #fff; transform: rotate(45deg); }
#assistantAddImage { position: relative; z-index: 22; pointer-events: auto; cursor: pointer; touch-action: manipulation; }

/* Customizable, reactive desk pet. */
.assistant-pet .pet-face { background: #292927; border: 0; transition: transform .2s ease, filter .2s ease; }
.assistant-pet .pet-face::before,
.assistant-pet .pet-face::after { background: #292927; border: 0; }
.assistant-pet .pet-face i { top: 23px; width: 4px; height: 5px; background: #fff; transition: height .12s, transform .12s; }
.assistant-pet .pet-face b { position: absolute; z-index: 3; left: 50%; top: 32px; width: 7px; height: 2px; border-bottom: 1px solid #777; transform: translateX(-50%); }
.assistant-pet .pet-face b::before,
.assistant-pet .pet-face b::after { display: none; }
.assistant-pet:hover .pet-face { transform: translateY(-2px) rotate(-2deg); }
.assistant-pet.pet-poked .pet-face { transform: scale(.88) translateY(3px); filter: brightness(.97); }
.assistant-pet.pet-blink .pet-face i { animation: petQuickBlink .22s ease; }
.assistant-pet.pet-bounce .pet-face { animation: petHappyBounce .4s ease; }
@keyframes petQuickBlink { 0%,100%{height:5px;transform:translateY(0)} 45%,60%{height:1px;transform:translateY(2px)} }
@keyframes petHappyBounce { 0%,100%{transform:translateY(0)} 45%{transform:translateY(-5px) rotate(3deg)} }
.assistant-pet .pet-face.custom-art { border: 0; background: transparent; box-shadow: none; overflow: visible; }
.assistant-pet .pet-face.custom-art::before,
.assistant-pet .pet-face.custom-art::after { display: none; }
.assistant-pet .pet-face.custom-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 7px 8px rgba(40,40,35,.14)); pointer-events: none; }
.pet-artwork-settings { margin-top: 17px; }
.pet-artwork-settings > span { display: block; margin-bottom: 7px; color: #888; font: 600 7px/1 var(--font-family); letter-spacing: .1em; }
.pet-artwork-preview { height: 86px; border: 1px solid #deded9; border-radius: 17px; background: #fff; display: grid; place-items: center; }
.pet-artwork-preview img { width: 68px; height: 68px; object-fit: contain; }
.pet-artwork-settings > div:nth-of-type(2) { display: grid; grid-template-columns: 1.35fr 1fr; gap: 6px; margin-top: 7px; }
.pet-artwork-settings button { height: 36px; border: 1px solid #deded9; border-radius: 11px; background: #fff; color: #666; font-size: 7px; }
.pet-artwork-settings small { display: block; margin-top: 7px; color: #999; font-size: 6px; line-height: 1.5; }
.mini-default-pet { position: relative; width: 55px; height: 55px; border-radius: 22px; background: #292927; display: block; }
.mini-default-pet i { position: absolute; top: 25px; width: 4px; height: 5px; border-radius: 50%; background: #fff; }
.mini-default-pet i:first-child { left: 16px; }.mini-default-pet i:nth-child(2) { right: 16px; }
.mini-default-pet b { position: absolute; left: 50%; top: 36px; width: 7px; height: 2px; border-bottom: 1px solid #777; transform: translateX(-50%); }

.assistant-submission { padding: 6px; overflow: hidden; }
.assistant-submission > img { display: block; width: min(180px, 100%); max-height: 220px; border-radius: 12px 12px 4px 12px; object-fit: cover; }
.assistant-submission > img + p { padding: 2px 7px 5px; }
.assistant-sent-file { min-width: 145px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-progress { align-self: stretch; margin: 2px 0; padding: 13px 14px; border: 1px solid #deded9; border-radius: 17px; background: rgba(255,255,255,.72); display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 10px; }
.assistant-progress strong,.assistant-progress small { display: block; }
.assistant-progress strong { color: #555; font-size: 8px; }
.assistant-progress small { margin-top: 4px; color: #aaa; font-size: 6px; }
.assistant-progress-spinner { width: 18px; height: 18px; border: 2px solid #deded9; border-top-color: #555; border-radius: 50%; animation: assistantProgressSpin .8s linear infinite; }
@keyframes assistantProgressSpin { to { transform: rotate(360deg); } }
.assistant-composer.busy { opacity: .62; }
.assistant-composer.busy::after { content: '任务进行中'; position: absolute; inset: 0; z-index: 30; border-radius: 25px; display: grid; place-items: center; background: rgba(245,245,242,.76); color: #888; font-size: 7px; letter-spacing: .08em; }
.assistant-settings > .assistant-danger-button { margin-top: 7px; background: #e8e8e4; color: #777; }
