.bots-page {
  width: min(var(--column), calc(100% - 80px));
  margin-inline: auto;
  padding-block: var(--section-gap) 80px;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}
.bots-intro { display: flex; flex-direction: column; gap: 16px; }
.bots-title { position: relative; display: flex; align-items: center; min-height: 22px; color: var(--muted); }
.bots-title h1:focus { outline: none; }
.bots-icon {
  position: absolute;
  left: -30px;
  top: 0;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url('../assets/bots.svg') center / 22px 22px no-repeat;
  mask: url('../assets/bots.svg') center / 22px 22px no-repeat;
}
.bots-back {
  position: absolute;
  left: 47px;
  top: 47px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 140ms ease-out;
}
.bots-back img { display: block; transform: rotate(-90deg); }
.bots-back:hover, .bots-back:focus-visible { background: rgba(29, 29, 31, .06); }
.bots-gallery {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  column-gap: 8px;
}
.bot-picker {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 16px;
}
.bot-picker button {
  display: block;
  width: 45px;
  height: 45px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: .32;
  transition: opacity 140ms ease-out;
}
.bot-picker img { display: block; width: 45px; height: 45px; object-fit: contain; }
.bot-picker button[aria-selected='true'], .bot-picker button:hover, .bot-picker button:focus-visible { opacity: 1; }
.bot-section { display: grid; grid-column: 2; grid-row: 1; min-width: 0; }
.bot-section[hidden] { display: none !important; }
.bot-showcase { display: grid; grid-template-rows: minmax(120px, 1fr) auto; justify-items: center; }
[data-bot='moss-bot'] { --bot-media-size: 224px; }
.bot-stage { position: relative; align-self: center; width: 114px; height: 120px; }
.bot-stage > img, .bot-stage > video {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--bot-media-size, 240px);
  height: var(--bot-media-size, 240px);
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.bot-video { visibility: hidden; }
.bot-video.is-current { visibility: visible; }
.bot-stage.has-video .bot-poster { visibility: hidden; }
.bot-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 8px; }
.bot-controls button {
  margin: 0;
  padding: 2px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
  color: var(--muted);
  opacity: .4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 140ms ease-out, opacity 140ms ease-out;
}
.bot-controls button[aria-pressed='true'] { background: #ebebeb; color: var(--ink); opacity: 1; }
.bot-controls button:hover, .bot-controls button:focus-visible { opacity: 1; }
.bots-page a:focus-visible, .bots-page button:focus-visible, .bots-back:focus-visible {
  outline: 1px solid var(--muted);
  outline-offset: 4px;
}
.bot-status { margin: 0; color: var(--muted); font-size: 12px; }
.bot-status:empty { display: none; }
@media (max-width: 520px) {
  .bots-gallery { column-gap: 8px; }
  .bot-controls { row-gap: 8px; }
}
@media (max-width: 810px) { .bots-back { left: 0; outline-offset: -2px; } }
@media (max-width: 716px) { .bots-back { top: 7px; } }
@media (prefers-reduced-motion: reduce) {
  .bots-back, .bot-picker button, .bot-controls button { transition: none; }
}
@media (forced-colors: active) { .bots-icon { background: CanvasText; forced-color-adjust: none; } }

.bot-composer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 56px 16px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  background: #ebebeb;
}
.composer-activity { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.composer-bot-stage { position: relative; flex: 0 0 32px; width: 32px; height: 32px; }
.composer-bot-stage > img, .composer-bot-stage > video {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
[data-preview-bot='moss-bot'] .composer-bot-stage > img,
[data-preview-bot='moss-bot'] .composer-bot-stage > video { width: 64px; height: 64px; }
.composer-bot-stage > video { visibility: hidden; }
.composer-bot-stage > video.is-current { visibility: visible; }
.composer-bot-stage.has-video .composer-bot-poster { visibility: hidden; }
.composer-status {
  display: flex;
  align-items: baseline;
  width: 146px;
  min-width: 0;
  height: 32px;
  color: var(--tertiary, #8f8f8f);
  line-height: 32px;
  white-space: nowrap;
}
.composer-status-label { display: inline-block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.composer-dots { display: inline-flex; flex-shrink: 0; width: 12px; }
.composer-dots span { animation: composer-dot 1.4s ease-in-out infinite; }
.composer-dots span:nth-child(2) { animation-delay: .16s; }
.composer-dots span:nth-child(3) { animation-delay: .32s; }
[data-preview-state='idle'] .composer-dots { visibility: hidden; }
.bots-install { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bot-composer > .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[data-preview-animating='false'] .composer-dots span { animation-play-state: paused; }
@keyframes composer-dot { 0%, 60%, 100% { opacity: .4; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .composer-dots span { animation: none; } }
