.hysj-ui-toast {
  position: fixed; z-index: 2147483646;
  top: max(var(--hysj-ui-space-large, 8px), calc(max(env(safe-area-inset-top), var(--safe-area-inset-top, 0px)) + var(--hysj-ui-space-large, 8px)));
  left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(420px, calc(100% - 2 * max(16px, env(safe-area-inset-left), env(safe-area-inset-right), var(--safe-area-inset-left, 0px), var(--safe-area-inset-right, 0px))));
  box-sizing: border-box; margin: 0; padding: var(--hysj-ui-space-small, 4px) var(--hysj-ui-space-large, 8px);
  border: solid transparent; border-width: 5px 12px; border-radius: 0; background: transparent;
  border-image: url("battle-pass-assets/native-ui/small-window.png") 25.75 52.05 18 49.5 fill stretch;
  color: #fff1d0; font: var(--hysj-ui-font-body, 12px)/1.4 "SimSun", "Songti SC", serif;
  text-align: center; text-shadow: 1px 1px #000; overflow-wrap: anywhere;
  box-shadow: none; pointer-events: none;
}
.hysj-ui-toast[data-kind="error"] { border-color: #c3765e; }
/* A child of the current modal belongs to that modal's top layer. */
.hysj-ui-toast[data-modal="true"] { position: absolute; top: var(--hysj-ui-space-large, 8px); }

/* X3 auth theme: the existing parchment form owns its status row, above submit.
   Explicit ID specificity keeps mobile compact-form rules from clipping text. */
#login #message.hysj-ui-toast[data-theme="auth"] {
  position:static;inset:auto;transform:none;z-index:auto;display:block;flex:none;
  width:100%;max-width:none;box-sizing:border-box;height:20px;min-height:20px;max-height:20px;
  margin:0;padding:0;
  border:0;border-image:none;border-radius:0;background:transparent;box-shadow:none;
  color:var(--muted,#7d6c57);font:var(--hysj-ui-font-body,12px)/20px var(--sans,"Microsoft YaHei","PingFang SC",sans-serif);
  text-align:left;text-shadow:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;overflow-wrap:normal;pointer-events:auto;
}
#login #message.hysj-ui-toast[data-theme="auth"][data-kind="error"] {color:#984333}
#login #message.hysj-ui-toast[data-theme="auth"][data-kind="success"] {color:#526b3f}
