.cw-support-card {
  position: absolute;
  z-index: 12;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 16px);
  padding-inline: 12px 2px;
  border: 1px solid #74818f;
  border-radius: 10px;
  background: #101b29f5;
  color: #f3f5f9;
  box-shadow: 0 4px 15px #0005;
  font: 14px/1.35 system-ui, sans-serif;
}
.cw-support-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #a7e8fa;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cw-support-card button {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 21px;
}
@media (max-height: 420px) {
  .cw-support-card { bottom: max(4px, env(safe-area-inset-bottom)); }
}
#stage .cw-support-card,
#view:has(#scene-tools button) .cw-support-card {
  bottom: max(58px, calc(env(safe-area-inset-bottom) + 50px));
}
#stage:has(#toast:not(:empty)) .cw-support-card {
  bottom: max(106px, calc(env(safe-area-inset-bottom) + 98px));
}
/* Keep the result confirmation and optional link in the controls, outside
   the photo and camera. The HOME prompt remains anchored in its own scene. */
#ending-phase:has(.cw-support-card) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}
#ending-phase-message { text-wrap: balance; }
#ending-phase .cw-support-card {
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
}
#ending-phase .cw-support-card a {
  white-space: nowrap;
}
#ending-phase .cw-support-card button {
  font-size: 18px;
}
@media (orientation: landscape) {
  #stage:has(#room-modes:not([hidden])) .cw-support-card {
    bottom: max(106px, calc(env(safe-area-inset-bottom) + 98px));
  }
}
