/* Transient feedback has one owner so notices never cover feature actions. */

:is(body, #pc-phone-stage) > #toast-container {
  inset: calc(env(safe-area-inset-top) + 76px) max(12px, calc((100vw - 680px) / 2)) auto auto;
  align-items: flex-end;
  transform: none;
  width: min(76vw, 320px);
}

body[data-active-panel="home"] #pc-phone-stage > #toast-container {
  /* The playable viewport is fixed; avoid a stale measured topbar height during launch. */
  top: 244px;
}

body[data-active-panel="home"]:has(
  #ant-scene-dialogue[data-dialogue-kind="growth"]:not(.hidden)
) #toast-container .toast.income {
  visibility: hidden;
  pointer-events: none;
}

body:not([data-active-panel="home"]) #toast-container .toast:is(
  [data-priority="1"],
  [data-priority="2"]
) {
  display: none;
}

:is(body, #pc-phone-stage) > #toast-container .toast {
  box-sizing: border-box;
  max-width: 100%;
  width: max-content;
}

:is(body, #pc-phone-stage) > #toast-container .toast.compact {
  width: auto;
  max-width: min(62vw, 230px);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
}
