/* Scott intro overlay — colors/layout matched to design mockup */

:root {
  --scott-ink: #111111;
  --scott-body: #2b2b2b;
  --scott-hint: #6e6e6e;
  --scott-placeholder: #9b9b9b;
  --scott-panel: #ffffff;
  --scott-stage: transparent;
  --scott-teal: #267f89;
  --scott-teal-hover: #1f6b73;
  --scott-backdrop: rgba(0, 0, 0, 0.75);
  --scott-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --scott-title-size: clamp(1.6rem, 2.4vw, 2.15rem);
  --scott-body-size: clamp(0.98rem, 1.15vw, 1.08rem);
  --scott-msg-size: 0.95rem;
  --scott-hint-size: 0.82rem;
  --scott-name-size: 1rem;
  --scott-status-size: 0.78rem;
  --scott-input-size: 1.02rem;
}

.scott-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  /* visualViewport JS may override top/left/width/height on mobile keyboards */
  box-sizing: border-box;
}

.scott-overlay[hidden] {
  display: none !important;
}

/* Black container @ 95% */
.scott-overlay__shade {
  width: 95%;
  height: 95%;
  background: var(--scott-backdrop);
  display: grid;
  place-items: center;
  padding: clamp(10px, 1.6vw, 22px);
  box-sizing: border-box;
}

/* White container fills the black frame */
.scott-overlay__panel {
  position: relative;
  width: 90%;
  height: 100%;
  max-width: none;
  background: var(--scott-panel);
  color: var(--scott-ink);
  border-radius: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  column-gap: clamp(28px, 4vw, 56px);
  padding: clamp(36px, 5vw, 64px) clamp(36px, 5vw, 72px);
  padding-right: clamp(56px, 6vw, 88px);
  box-sizing: border-box;
  font-family: var(--scott-font);
  overflow: hidden;
  min-height: 0;
  /* Let the stage size itself from panel height (keeps a true square). */
  container-type: size;
  container-name: scott-panel;
}

/* Stretch columns in chat so the composer stays visible */
.scott-overlay__panel:has(.scott-overlay__content.is-chat) {
  align-items: stretch;
  padding-bottom: clamp(32px, 4vw, 48px);
}

.scott-overlay__close,
#scott-overlay button.scott-overlay__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 0 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.scott-overlay__icon {
  display: block;
  width: 36px;
  height: 36px;
  pointer-events: none;
}

#scott-overlay button.scott-overlay__close:hover,
#scott-overlay button.scott-overlay__close:focus,
#scott-overlay button.scott-overlay__close:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
  opacity: 0.75;
  outline: none;
}

/* Left: animation stage */
.scott-overlay__stage {
  position: relative;
  /* Cap by column width AND panel height so the box stays square. */
  width: min(100%, 520px, calc(100cqh - 8px));
  aspect-ratio: 1 / 1;
  max-height: calc(100cqh - 8px);
  justify-self: start;
  align-self: center;
  background: var(--scott-stage);
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  left: 50%;
  transform: translate(-50%, 0);
}

.scott-overlay__canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
  /* JS may set an explicit square size when the stage is non-square. */
  max-width: 100%;
  max-height: 100%;
}

.scott-overlay__canvas.is-ready {
  opacity: 1;
}

.scott-overlay__loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #666;
  font-size: 13px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scott-overlay__loader.is-gone {
  opacity: 0;
}

.scott-overlay__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.05rem;
  min-width: 0;
  max-width: 540px;
  height: 100%;
  padding-top: 12px;
}

.scott-overlay__content.is-chat {
  justify-content: stretch;
  max-width: none;
  padding-top: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-self: stretch;
}

.scott-overlay__intro {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.scott-overlay__title {
  margin: 0;
  font-family: var(--scott-font);
  font-size: var(--scott-title-size);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #111;
  text-wrap: balance;
}

.scott-overlay__body {
  margin: 0;
  font-family: var(--scott-font);
  font-size: var(--scott-body-size);
  line-height: 1.55;
  font-weight: 400;
  color: var(--scott-body);
  text-wrap: pretty;
}

.scott-overlay__form,
.scott-overlay__chat-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.55rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.scott-overlay__form {
  padding-inline: 10px;
}

.scott-overlay__chat {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  gap: 0;
  box-sizing: border-box;
}

.scott-overlay__chat[hidden],
.scott-overlay__intro[hidden] {
  display: none !important;
}

.scott-overlay__chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.scott-overlay__chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--scott-teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--scott-font);
  font-weight: 700;
  font-size: 15px;
}

.scott-overlay__chat-name {
  font-family: var(--scott-font);
  font-weight: 700;
  font-size: var(--scott-name-size);
  color: #111;
  line-height: 1.2;
}

.scott-overlay__chat-status {
  display: none;
  font-family: var(--scott-font);
  font-size: var(--scott-status-size);
  color: var(--scott-hint);
  margin-top: 2px;
  line-height: 1.3;
}

.scott-overlay__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 4px 16px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.scott-overlay__msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--scott-font);
  font-size: var(--scott-msg-size);
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.scott-overlay__msg--user {
  align-self: flex-end;
  background: var(--scott-teal);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.scott-overlay__msg--ai {
  align-self: flex-start;
  background: #f1f2f4;
  color: #222;
  border-bottom-left-radius: 4px;
}

.scott-overlay__msg--typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}

.scott-overlay__typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa0a6;
  animation: scott-typing 1.1s infinite ease-in-out;
}

.scott-overlay__typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.scott-overlay__typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes scott-typing {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.scott-overlay__chat-form {
  margin-top: 0;
  padding-top: 8px;
  padding-bottom: 12px;
  padding-inline: 10px;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.scott-overlay__field-row {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 14px;
  /* Shadow clearance below; horizontal inset comes from form padding */
  padding: 0;
  box-sizing: border-box;
}

.scott-overlay__input {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 55px !important;
  height: auto !important;
  padding: 0.88rem 3.8rem 0.88rem 1.3rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--scott-ink) !important;
  font-family: var(--scott-font) !important;
  font-size: var(--scott-input-size) !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.14) !important;
  box-sizing: border-box !important;
}

.scott-overlay__input::placeholder {
  color: var(--scott-placeholder);
}

#scott-overlay .scott-overlay__input:focus {
  outline: 2px solid rgba(38, 127, 137, 0.35);
  box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.14) !important;
}

/* Beat Elementor kit: `.elementor-kit-9 button { padding: 18px 40px; ... }` */
#scott-overlay button.scott-overlay__submit,
#scott-overlay-composer-portal button.scott-overlay__submit {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  left: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.scott-overlay__icon--send {
  width: 42px !important;
  height: 42px !important;
  display: block;
  object-fit: contain;
}

#scott-overlay button.scott-overlay__submit:hover,
#scott-overlay button.scott-overlay__submit:focus,
#scott-overlay button.scott-overlay__submit:focus-visible,
#scott-overlay-composer-portal button.scott-overlay__submit:hover,
#scott-overlay-composer-portal button.scott-overlay__submit:focus,
#scott-overlay-composer-portal button.scott-overlay__submit:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  color: transparent !important;
  opacity: 0.9;
  outline: none;
}

#scott-overlay button.scott-overlay__submit:active,
#scott-overlay-composer-portal button.scott-overlay__submit:active {
  transform: translateY(-50%) scale(0.96) !important;
}

.scott-overlay__hint {
  display: block;
  margin: 0;
  font-family: var(--scott-font);
  font-size: var(--scott-hint-size);
  line-height: 1.45;
  color: var(--scott-hint);
}

body.scott-overlay-open {
  overflow: hidden;
  /* Prevent iOS rubber-band scroll behind the modal */
  overscroll-behavior: none;
}

/* —— Tablet / compact desktop —— */
@media (max-width: 1100px) {
  .scott-overlay__panel {
    width: min(94%, 980px);
    column-gap: clamp(20px, 3vw, 36px);
    padding: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 48px);
    padding-right: clamp(48px, 5vw, 72px);
  }

  .scott-overlay__stage {
    width: min(100%, 420px, calc(100cqh - 8px));
  }
}

/* —— Mobile / stacked —— */
@media (max-width: 860px) {
  :root {
    --scott-title-size: 1.45rem;
    --scott-body-size: 0.98rem;
    --scott-msg-size: 0.95rem;
    --scott-hint-size: 0.8rem;
    --scott-name-size: 0.98rem;
    --scott-status-size: 0.75rem;
    --scott-input-size: 16px; /* avoids iOS zoom */
  }

  .scott-overlay__shade {
    width: 100%;
    height: 100%;
    /* Prefer parent height (visualViewport-synced) over dvh — dvh ignores the keyboard. */
    max-height: 100%;
    padding: max(8px, env(safe-area-inset-top, 0px))
      max(8px, env(safe-area-inset-right, 0px))
      max(8px, env(safe-area-inset-bottom, 0px))
      max(8px, env(safe-area-inset-left, 0px));
  }

  .scott-overlay__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    row-gap: 12px;
    align-items: stretch;
    overflow: hidden;
    padding: 48px 18px 16px;
    padding-top: max(48px, calc(12px + env(safe-area-inset-top, 0px)));
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
    padding-bottom: max(24px, calc(16px + env(safe-area-inset-bottom, 0px)));
  }

  .scott-overlay__panel:has(.scott-overlay__content.is-chat) {
    padding-bottom: 10px;
  }

  /* Virtual keyboard: keep a compact avatar (162px), scrollable intro. */
  .scott-overlay--keyboard .scott-overlay__panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding-top: max(24px, calc(4px + env(safe-area-inset-top, 0px)));
    padding-bottom: 8px;
    row-gap: 8px;
    overflow: hidden;
  }

  .scott-overlay--keyboard .scott-overlay__stage {
    display: grid !important;
    width: min(100%, 162px) !important;
    max-height: 152px !important;
    height: 162px !important;
    flex: 0 0 162px;
    align-self: center;
    order: 0;
  }

  .scott-overlay--keyboard .scott-overlay__content,
  .scott-overlay--keyboard .scott-overlay__content.is-chat {
    flex: 0 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    gap: 0.35rem;
    order: 1;
    overflow: initial;
  }

  .scott-overlay--keyboard .scott-overlay__intro {
    gap: 0.75rem;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .scott-overlay--keyboard .scott-overlay__chat-header {
    padding: 4px 8px;
    gap: 8px;
  }

  .scott-overlay--keyboard .scott-overlay__chat-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .scott-overlay--keyboard .scott-overlay__messages {
    min-height: 0;
    max-height: 123px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .scott-overlay--keyboard .scott-overlay__chat-form,
  .scott-overlay--keyboard .scott-overlay__form {
    padding-top: 4px;
    padding-bottom: 0;
    flex-shrink: 0;
    margin-top: 0;
  }

  .scott-overlay--keyboard .scott-overlay__field-row {
    margin-bottom: 0;
  }

  .scott-overlay__close,
  #scott-overlay button.scott-overlay__close {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .scott-overlay__icon {
    width: 32px;
    height: 32px;
  }

  .scott-overlay__stage {
    width: min(100%, 330px, 300px);
    max-height: 300px;
    aspect-ratio: 1 / 1;
    justify-self: center;
    align-self: center;
  }

  /* In chat mode, keep the avatar compact so messages get the space */
  .scott-overlay__panel:has(.scott-overlay__content.is-chat) .scott-overlay__stage {
    width: min(100%, 210px);
    max-height: 210px;
    left: 27%;
  }

  .scott-overlay__content {
    max-width: none;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding-top: 0;
    gap: 0.75rem;
    overflow: hidden;
  }

  .scott-overlay__content.is-chat {
    height: 100%;
  }

  .scott-overlay__chat {
    overflow: initial;
  }

  #scott-overlay .scott-overlay__title {
    font-size: var(--scott-title-size) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
  }

  #scott-overlay .scott-overlay__body {
    font-size: var(--scott-body-size) !important;
    line-height: 1.5 !important;
  }

  .scott-overlay__intro {
    gap: 0.75rem;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .scott-overlay__form,
  .scott-overlay__chat-form {
    gap: 0.7rem;
    margin-top: 0.25rem;
    padding-bottom: 10px;
    padding-inline: 12px !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #scott-overlay .scott-overlay__field-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #scott-overlay .scott-overlay__input {
    min-height: 49px !important;
    padding: 0.78rem 3.4rem 0.78rem 1.1rem !important;
    font-size: var(--scott-input-size) !important;
    line-height: 1.35 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #scott-overlay button.scott-overlay__submit,
  #scott-overlay-composer-portal button.scott-overlay__submit {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    right: 5px !important;
  }

  .scott-overlay__icon--send {
    width: 38px !important;
    height: 38px !important;
  }

  #scott-overlay .scott-overlay__hint {
    font-size: var(--scott-hint-size) !important;
    line-height: 1.4 !important;
  }

  .scott-overlay__chat-header {
    padding-bottom: 10px;
    gap: 10px;
  }

  .scott-overlay__chat-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  #scott-overlay .scott-overlay__chat-name {
    font-size: var(--scott-name-size) !important;
  }

  #scott-overlay .scott-overlay__chat-status {
    font-size: var(--scott-status-size) !important;
  }

  .scott-overlay__messages {
    min-height: 0;
    flex: 1 1 auto;
    padding: 12px 6px 12px 6px;
    gap: 8px;
  }

  #scott-overlay .scott-overlay__msg {
    max-width: 92%;
    font-size: var(--scott-msg-size) !important;
    line-height: 1.45 !important;
    padding: 9px 12px;
  }

  .scott-overlay__chat-form {
    padding-top: 6px;
    padding-bottom: 10px;
  }
}

/* —— Narrow phones —— */
@media (max-width: 420px) {
  :root {
    --scott-title-size: 1.28rem;
    --scott-body-size: 0.94rem;
    --scott-msg-size: 0.92rem;
    --scott-hint-size: 0.75rem;
    --scott-name-size: 0.94rem;
    --scott-status-size: 0.72rem;
  }

  .scott-overlay__panel {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-top: 44px;
    padding-bottom: max(24px, calc(14px + env(safe-area-inset-bottom, 0px)));
  }

  .scott-overlay__form,
  .scott-overlay__chat-form {
    padding-inline: 10px !important;
  }

  .scott-overlay__stage {
    width: min(100%, 270px, 255px);
    max-height: 255px;
    margin-left: -35%;
  }


  .scott-overlay--keyboard .scott-overlay__stage {
    margin-left: -12%;
  }

  .scott-overlay__panel:has(.scott-overlay__content.is-chat) .scott-overlay__stage {
    width: min(100%, 168px);
    max-height: 168px;
    margin-left: -15%;
    
  }

  .scott-overlay__content {
    gap: 0.65rem;
  }

  .scott-overlay__intro {
    gap: 0.65rem;
  }
}

/* —— Short screens / landscape phones —— */
@media (max-width: 860px) and (max-height: 560px) {
  :root {
    --scott-title-size: 1.15rem;
    --scott-body-size: 0.88rem;
    --scott-msg-size: 0.88rem;
    --scott-hint-size: 0.72rem;
    --scott-name-size: 0.9rem;
    --scott-status-size: 0.7rem;
  }

  .scott-overlay__panel {
    grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
    column-gap: 14px;
    row-gap: 0;
    padding: 12px 14px;
    padding-right: 48px;
    align-items: stretch;
  }

  .scott-overlay__close,
  #scott-overlay button.scott-overlay__close {
    top: 8px;
    right: 8px;
  }

  .scott-overlay__stage {
    width: 100%;
    max-height: none;
    height: min(100%, 330px);
    aspect-ratio: 1 / 1;
    justify-self: center;
    align-self: center;
  }

  .scott-overlay__panel:has(.scott-overlay__content.is-chat) .scott-overlay__stage {
    width: 100%;
    max-height: 270px;
  }

  .scott-overlay__content {
    gap: 0.5rem;
  }

  #scott-overlay .scott-overlay__title {
    line-height: 1.2 !important;
  }

  #scott-overlay .scott-overlay__body {
    line-height: 1.4 !important;
  }

  .scott-overlay__intro {
    gap: 0.5rem;
  }
}

#scott-overlay-composer-portal {
  display: block;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

#scott-overlay-composer-portal .scott-overlay__field-row {
  position: relative;
  width: 100%;
  margin: 0;
}

#scott-overlay-composer-portal .scott-overlay__input {
  /* Match overlay input look when the row is portaled out of #scott-overlay */
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 55px !important;
  padding: 0.88rem 3.8rem 0.88rem 1.3rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--scott-ink) !important;
  font-family: var(--scott-font) !important;
  font-size: var(--scott-input-size) !important;
  box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.14) !important;
  box-sizing: border-box !important;
}

@media (max-width: 860px) {
  #scott-overlay-composer-portal .scott-overlay__input {
    min-height: 49px !important;
    padding: 0.78rem 3.4rem 0.78rem 1.1rem !important;
    font-size: var(--scott-input-size) !important;
  }

  /* Keyboard: compact 3D stage (beats chat :has() rules). */
  .scott-overlay.scott-overlay--keyboard .scott-overlay__panel .scott-overlay__stage,
  .scott-overlay.scott-overlay--keyboard
    .scott-overlay__panel:has(.scott-overlay__content.is-chat)
    .scott-overlay__stage {
    display: grid !important;
    width: min(100%, 162px) !important;
    max-height: 152px !important;
    height: 162px !important;
  }

  /* Keyboard intro only (no chat): shift stage left */
  .scott-overlay.scott-overlay--keyboard
    .scott-overlay__panel:not(:has(.scott-overlay__content.is-chat))
    .scott-overlay__stage {
    margin-left: -61% !important;
  }
}
