/* ponytail: layout-only correction for the reviewed narrow viewport. */
@media screen {
  /* Keep the brand line in the sidebar header compact so the close control stays put. */
  .admin-v2 .admin-shell-sidebar-head {
    align-items: center;
  }
  .admin-v2 .admin-shell-brand-text {
    min-width: 0;
    overflow: hidden;
  }
  .admin-v2 .admin-shell-brand-text small {
    display: block;
    max-inline-size: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-v2 .admin-shell-drawer-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  /* Keep generated character art inside its framed media slot. */
  .app-shell main.page .txchars-edit-hero,
  .app-dialog-overlay.txchars-overlay .txchars-edit-hero,
  .app-dialog-overlay.collection-drawer-backdrop .collection-drawer-image {
    min-height: 0;
    overflow: hidden;
  }
  .app-shell main.page .txchars-edit-hero img,
  .app-dialog-overlay.txchars-overlay .txchars-edit-hero img,
  .app-dialog-overlay.collection-drawer-backdrop .collection-drawer-img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  /* Anchor the card-detail close control to a stable, reachable corner. */
  .spirit-dialog {
    position: relative;
    overflow: hidden;
  }
  .spirit-dialog .spirit-close {
    position: absolute;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: -4px -4px 8px auto;
  }
}
