/* Talk & Create — page-specific overrides (isolated from Magic Sketch) */

/* Header: recents only — no title text, room for generated thumbnails */
body.talk-create-page .hdr-editor-title-lane {
  gap: 0;
}

/* Loading thumbs: show a faint placeholder instead of fully invisible strip on refresh */
body.talk-create-page .sketch-recents-strip .sketch-recent-thumb:not(.is-rendered),
body.talk-create-page .sketch-recents-strip .talk-create-recent-thumb:not(.is-rendered) {
  opacity: 0.28 !important;
  visibility: visible !important;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.06);
}

body.talk-create-page .hdr-editor-title-lane .talk-create-recents-strip.sketch-recents-strip {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0 8px;
}

body.talk-create-page.sketch-page .main-header .hdr-editor-title-lane #talk-create-recents-strip.sketch-recents-strip {
  position: static !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 8px !important;
}

body.talk-create-page .tg-sidebar-textarea {
  min-height: 72px;
  max-height: 120px;
}

/* Prompt clear (×) — sits beside the field, not over the text */
body.talk-create-page .tc-prompt-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
}

body.talk-create-page .tc-prompt-wrap .tg-sidebar-textarea,
body.talk-create-page .tc-prompt-wrap .tg-prompt-textarea {
  box-sizing: border-box;
}

/* Desktop sidebar: full-width prompt (width:0 flex trick is mobile-composer only). */
@media (min-width: 1025px) {
  body.talk-create-page .qe-sidebar .tc-prompt-wrap--desktop {
    display: block !important;
    width: 100% !important;
    position: relative !important;
  }

  body.talk-create-page .qe-sidebar .tc-prompt-wrap--desktop > .tg-sidebar-textarea,
  body.talk-create-page .qe-sidebar .tc-prompt-wrap--desktop > .tg-prompt-textarea {
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
    padding-right: 36px !important;
  }

  body.talk-create-page .qe-sidebar .tc-prompt-wrap--desktop > .tc-prompt-clear:not(.u-hidden) {
    position: absolute !important;
    right: 10px !important;
    top: 10px !important;
    left: auto !important;
    margin-top: 0 !important;
    flex: none !important;
  }
}

body.talk-create-page .tc-prompt-clear {
  position: static;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.talk-create-page .tc-prompt-clear:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

body.talk-create-page .tc-prompt-clear.u-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  body.talk-create-page .tc-prompt-wrap .tg-sidebar-textarea,
  body.talk-create-page .tc-prompt-wrap .tg-prompt-textarea {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    padding-right: 4px !important;
  }

  body.talk-create-page .tc-prompt-wrap {
    align-items: center;
  }

  body.talk-create-page .tc-prompt-clear {
    margin-top: 0;
    align-self: center;
  }

  body.talk-create-page #qe-mobile-composer .tg-prompt-wrapper.tc-prompt-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* ── Action buttons (desktop + mobile) ── */
body.talk-create-page .tc-action-btn,
body.talk-create-page .tc-mobile-speak-btn,
body.talk-create-page .tc-mobile-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

body.talk-create-page .tc-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

body.talk-create-page .tc-btn-icon svg {
  display: block;
}

body.talk-create-page .tc-speak-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #04110c;
  font-weight: 700;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.24);
}

body.talk-create-page .tc-mobile-send-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #04110c;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.24);
}

body.talk-create-page .tc-speak-btn.tc-mode-send {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #04110c;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.24);
}

body.talk-create-page .tc-speak-btn.is-recording,
body.talk-create-page .tc-mobile-speak-btn.is-recording {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  animation: tc-pulse 1.2s ease-in-out infinite;
}

body.talk-create-page .tc-speak-btn.is-busy,
body.talk-create-page .tc-mobile-speak-btn.is-busy,
body.talk-create-page .tc-mobile-send-btn.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

@keyframes tc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

/* Desktop sidebar — Speak + Send side by side, compact */
body.talk-create-page .tc-sidebar-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

body.talk-create-page .tc-sidebar-actions #btn-speak.tc-action-btn,
body.talk-create-page .tc-sidebar-actions #btn-send.tc-action-btn {
  display: inline-flex !important;
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  min-height: 0 !important;
  height: 34px !important;
  max-height: 34px !important;
  padding: 0 8px !important;
  gap: 5px !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

body.talk-create-page .tc-sidebar-actions #btn-send.tc-send-btn.u-hidden {
  display: none !important;
}

body.talk-create-page .tc-sidebar-actions #btn-speak.tc-action-btn .tc-btn-icon svg,
body.talk-create-page .tc-sidebar-actions #btn-send.tc-action-btn .tc-btn-icon svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0;
}

body.talk-create-page .tc-sidebar-actions #btn-speak.tc-action-btn .tc-btn-text,
body.talk-create-page .tc-sidebar-actions #btn-send.tc-action-btn .tc-btn-text {
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.talk-create-page #btn-send.tc-send-btn.is-busy,
body.talk-create-page .tc-mobile-send-btn.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

body.talk-create-page .tc-hidden-section {
  display: none !important;
}

body.talk-create-page .tc-size-select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 0.82rem;
}

/* Enhance prompt button — desktop + mobile */
body.talk-create-page .tc-enhance-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  cursor: not-allowed;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.talk-create-page .tc-enhance-btn--desktop {
  margin-top: 8px;
}

body.talk-create-page .tc-enhance-btn.is-ready {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #04110c;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.22);
}

body.talk-create-page .tc-enhance-btn.is-ready:hover {
  filter: brightness(1.05);
}

body.talk-create-page .tc-enhance-btn.is-busy {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}

body.talk-create-page .tc-enhance-btn:disabled:not(.is-ready) {
  opacity: 0.72;
}

body.talk-create-page .u-upload-btn-compact.u-mt-10-full {
  width: 100%;
  margin-top: 10px;
}

body.talk-create-page.sketch-page .main-header .hdr-editor-title-lane #talk-create-recents-strip.talk-create-recents-strip {
  position: static !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 8px !important;
}

body.talk-create-page.sketch-page .main-header .hdr-editor-title-lane #talk-create-recents-strip.sketch-recents-strip::-webkit-scrollbar,
body.talk-create-page.sketch-page .main-header .hdr-editor-title-lane #talk-create-recents-strip.talk-create-recents-strip::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Desktop: undo sketch.css nth-child(n+11) cap — strip scrolls horizontally and auto-scrolls to newest */
body.talk-create-page #talk-create-recents-strip .sketch-recent-thumb:nth-child(n+11),
body.talk-create-page #talk-create-recents-strip .talk-create-recent-thumb:nth-child(n+11) {
  display: block !important;
}

@media (max-width: 1024px) {
  body.talk-create-page .main-header .hdr-editor-title-lane #talk-create-recents-strip.sketch-recents-strip .sketch-recent-thumb,
  body.talk-create-page .main-header .hdr-editor-title-lane #talk-create-recents-strip.sketch-recents-strip .talk-create-recent-thumb {
    width: 34px !important;
    height: 42px !important;
    min-width: 34px !important;
    min-height: 42px !important;
    max-width: 34px !important;
    max-height: 42px !important;
    flex: 0 0 34px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 4px !important;
  }

  /* NOTE: nth-child display:none caps removed — the strip is horizontally
     scrollable and auto-scrolls to the newest (last child). Capping by
     nth-child(n+N) hid the NEWEST thumbnails once the recents count exceeded
     N, which made freshly generated images appear missing in the header. */
}

/* Touch: thumbs stay tappable; strip lane must not steal header taps */
@media (max-width: 1024px) and (pointer: coarse) {
  body.talk-create-page #talk-create-recents-strip {
    pointer-events: none !important;
  }

  body.talk-create-page #talk-create-recents-strip .sketch-recent-thumb,
  body.talk-create-page #talk-create-recents-strip .talk-create-recent-thumb {
    pointer-events: auto !important;
  }
}

#talk-create-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE / TABLET — compact composer (max canvas space)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  body.talk-create-page #qe-mobile-composer.tc-mobile-composer {
    padding: 6px 8px 4px !important;
    left: 60px;
    right: 0;
    max-height: none;
  }

  body.talk-create-page #qe-mobile-composer .tc-mobile-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* iPad portrait: native <select> hit-slop bleeds upward into the prompt row */
  body.talk-create-page #qe-mobile-composer .tc-input-row {
    position: relative;
    z-index: 5;
    isolation: isolate;
  }

  body.talk-create-page #qe-mobile-composer .tg-prompt-wrapper,
  body.talk-create-page #qe-mobile-composer #qe-prompt-mobile {
    position: relative;
    z-index: 6;
    touch-action: manipulation;
  }

  /* Extend prompt hit band downward so A4 select cannot steal composer taps */
  body.talk-create-page #qe-mobile-composer .tg-prompt-wrapper.tc-prompt-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 18px;
    z-index: 7;
  }

  body.talk-create-page #qe-mobile-composer .tc-params-row {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-top: 2px;
  }

  /*
   * CRITICAL: iOS native <select> expands its touch target upward into the prompt.
   * Disable direct hits on the select; open it only via the wrapper (JS).
   */
  html.tg-ipad-editor-shell body.talk-create-page #qe-mobile-composer #tc-size-mobile,
  body.talk-create-page #qe-mobile-composer #tc-size-mobile {
    pointer-events: none !important;
  }

  body.talk-create-page #qe-mobile-composer.tc-composer-prompt-active .tc-params-row {
    pointer-events: none !important;
  }

  html.tg-ipad-editor-shell body.talk-create-page #qe-mobile-composer.tc-composer-prompt-active .tc-params-row,
  html.tg-ipad-editor-shell body.talk-create-page #qe-mobile-composer.tc-composer-prompt-active .tc-size-param,
  html.tg-ipad-editor-shell body.talk-create-page #qe-mobile-composer.tc-composer-prompt-active #tc-size-mobile {
    pointer-events: none !important;
  }

  /*
   * CRITICAL (iPad Speak & Create): body also has .sketch-page, so sketch.css does
   * transform: translateY(--kb-offset) on #qe-mobile-composer. That breaks touch
   * hit-testing after refresh-with-keyboard (tap prompt → hits A4 select).
   * Keep transform off on this page only. Also kill leftover ui-glue top pins.
   */
  html.tg-ipad-editor-shell body.talk-create-page #qe-mobile-composer.tg-composer,
  body.talk-create-page #qe-mobile-composer.tg-composer {
    transform: none !important;
    top: auto !important;
    bottom: 0 !important;
  }

  body.talk-create-page .qe-panel-center {
    bottom: var(--tc-composer-reserve, 112px) !important;
  }

  body.talk-create-page #qe-prompt-mobile.tg-prompt-textarea {
    min-height: 0 !important;
    max-height: 56px !important;
    height: 40px;
    padding: 7px 4px 7px 10px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  body.talk-create-page #qe-mobile-composer .tc-input-row {
    gap: 4px !important;
    align-items: stretch !important;
    min-height: 0 !important;
  }

  body.talk-create-page #qe-mobile-composer .tg-prompt-wrapper {
    min-height: 40px;
    align-items: center;
    padding-right: 2px;
    box-sizing: border-box;
  }

  body.talk-create-page #qe-mobile-composer .tc-prompt-wrap {
    gap: 2px;
  }

  body.talk-create-page #qe-mobile-composer .tc-prompt-clear {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    font-size: 12px;
    margin-right: 3px;
  }

  /* Mic + "Speak" always visible; send is separate */
  body.talk-create-page .tc-mobile-action-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    position: relative;
  }

  body.talk-create-page .tc-mobile-speak-btn.is-recording {
    z-index: 2;
    min-width: 48px;
    flex: 1 1 auto;
    max-width: 72px;
  }

  body.talk-create-page .tc-mobile-speak-btn {
    flex-direction: column;
    gap: 1px;
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 3px 2px;
    border-radius: 10px;
  }

  body.talk-create-page .tc-mobile-speak-btn .tc-btn-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
  }

  body.talk-create-page .tc-mobile-speak-btn .tc-btn-icon svg {
    width: 18px;
    height: 18px;
  }

  body.talk-create-page .tc-mobile-send-btn {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
  }

  body.talk-create-page .tc-mobile-send-btn .tc-btn-icon svg {
    width: 16px;
    height: 16px;
  }

  body.talk-create-page .tc-mobile-send-btn.u-hidden {
    display: none !important;
  }

  /* Params row — one tight line */
  body.talk-create-page #qe-mobile-composer .tc-params-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.talk-create-page #qe-mobile-composer .tc-size-param {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.talk-create-page .tc-enhance-btn--mobile {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 42%;
    min-height: 34px !important;
    height: 34px !important;
    margin-top: 0 !important;
    padding: 0 8px !important;
    font-size: 9px !important;
    white-space: nowrap;
    order: -1;
  }

  body.talk-create-page #qe-mobile-composer .tc-params-row {
    flex-direction: row !important;
  }

  body.talk-create-page #qe-mobile-composer .tc-size-mobile {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 34px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
  }

  /* Slim credits footer */
  body.talk-create-page .tc-credit-row-bottom {
    display: flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 2px 4px 4px !important;
    margin: 0 !important;
    border-top: none !important;
  }

  body.talk-create-page .tc-credits-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    font-size: 10px;
    line-height: 1.2;
    color: var(--text-dim, #94a3b8);
    text-align: center;
    margin: 0;
  }

  body.talk-create-page .tc-credits-sep {
    opacity: 0.55;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  body.talk-create-page .tc-mobile-speak-btn {
    min-width: 48px;
    width: 48px;
    height: 48px;
  }

  body.talk-create-page .tc-mobile-send-btn {
    min-width: 40px;
    width: 40px;
    height: 40px;
  }

  body.talk-create-page #qe-prompt-mobile.tg-prompt-textarea {
    font-size: 14px !important;
  }

  body.talk-create-page #qe-mobile-composer .tg-mini-select-trigger span {
    max-width: 96px;
  }
}

@media (max-width: 600px) {
  body.talk-create-page .tc-credits-bottom {
    font-size: 9px;
  }
}

/* Canvas usage tip — slides out from behind Layers button */
body.talk-create-page .qe-layer-fab-wrap {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
}

body.talk-create-page .qe-layer-fab-wrap .qe-layer-fab {
  position: relative;
  top: auto;
  right: auto;
}

body.talk-create-page .tc-canvas-tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 6px);
  z-index: 29;
  width: max-content;
  max-width: min(268px, calc(100vw - 88px));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(2, 12, 20, 0.94);
  color: #e2e8f0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  transform: translate(18px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

body.talk-create-page .tc-canvas-tip.is-visible {
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: auto;
}

body.talk-create-page .tc-canvas-tip.is-hiding {
  transform: translate(10px, -50%);
  opacity: 0;
  pointer-events: none;
}

/* Desktop: nudge tip below page header overlap */
@media (min-width: 1025px) {
  body.talk-create-page .tc-canvas-tip {
    transform: translate(18px, calc(-50% + 5px));
  }

  body.talk-create-page .tc-canvas-tip.is-visible {
    transform: translate(0, calc(-50% + 5px));
  }

  body.talk-create-page .tc-canvas-tip.is-hiding {
    transform: translate(10px, calc(-50% + 5px));
  }
}

body.talk-create-page .tc-canvas-tip__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #cbd5e1;
}

body.talk-create-page .tc-canvas-tip__text strong {
  color: #6ee7b7;
  font-weight: 700;
}

body.talk-create-page .tc-canvas-tip__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

body.talk-create-page .tc-canvas-tip__watch {
  flex-shrink: 0;
  border: 1px solid rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

body.talk-create-page .tc-canvas-tip__watch:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

body.talk-create-page .tc-canvas-tip__never {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  touch-action: manipulation;
}

body.talk-create-page .tc-canvas-tip__never:hover {
  color: #e2e8f0;
}

body.talk-create-page .tc-canvas-tip__close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}

body.talk-create-page .tc-canvas-tip__close:hover {
  color: #fff;
  border-color: rgba(16, 185, 129, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  body.talk-create-page .tc-canvas-tip {
    transition: opacity 0.2s ease;
    transform: translate(0, -50%);
  }

  body.talk-create-page .tc-canvas-tip.is-visible {
    transform: translate(0, -50%);
  }

  @media (min-width: 1025px) {
    body.talk-create-page .tc-canvas-tip,
    body.talk-create-page .tc-canvas-tip.is-visible {
      transform: translate(0, calc(-50% + 5px));
    }
  }

  @media (max-width: 1024px) {
    body.talk-create-page .tc-canvas-tip,
    body.talk-create-page .tc-canvas-tip.is-visible {
      transform: translate(0, 0);
    }
  }
}

@media (max-width: 1024px) {
  body.talk-create-page .qe-layer-fab-wrap {
    position: fixed;
    top: 92px;
    right: 12px;
    z-index: 13010;
  }

  body.talk-create-page .tc-canvas-tip {
    top: 0;
    right: calc(100% + 6px);
    max-width: min(252px, calc(100vw - 76px));
    transform: translate(18px, 0);
  }

  body.talk-create-page .tc-canvas-tip.is-visible {
    transform: translate(0, 0);
  }

  body.talk-create-page .tc-canvas-tip.is-hiding {
    transform: translate(10px, 0);
  }
}

@media (max-width: 600px) {
  body.talk-create-page .qe-layer-fab-wrap {
    top: 88px;
  }

  body.talk-create-page .tc-canvas-tip {
    max-width: min(240px, calc(100vw - 72px));
    padding: 8px 10px;
  }

  body.talk-create-page .tc-canvas-tip__text {
    font-size: 0.72rem;
    line-height: 1.5;
  }
}

@media (max-width: 1024px) and (pointer: coarse) {
  body.talk-create-page .tc-canvas-tip__close {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 8px;
  }

  body.talk-create-page .tc-canvas-tip__never {
    min-height: 36px;
    padding: 6px 0;
  }

  body.talk-create-page .tc-canvas-tip__watch {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* sketch.css sets body { touch-action:none } on .sketch-page — unblock Speak/Stop composer */
body.talk-create-page.tg-body,
body.talk-create-page.sketch-page {
  touch-action: manipulation !important;
}

body.talk-create-page #qe-mobile-composer,
body.talk-create-page #qe-mobile-composer .tc-mobile-action-stack,
body.talk-create-page #qe-mobile-composer .tc-speak-btn,
body.talk-create-page #qe-mobile-composer .tc-mobile-send-btn {
  touch-action: manipulation !important;
}

body.talk-create-page #qe-canvas-container,
body.talk-create-page #qe-mobile-tool-strip,
body.talk-create-page #canvas-mask,
body.talk-create-page #canvas-base {
  touch-action: none !important;
}

html.tg-ipad-editor-shell body.talk-create-page .qe-panel-center {
  bottom: var(--tc-composer-reserve, 112px) !important;
}
