.owner-sidebar-toggle {
  display: none;
}

.owner-sidebar-resize {
  display: none;
}

@media (min-width: 841px) {
  body[data-owner="true"] #profilePanel,
  body[data-owner="true"] .owner-sidebar-toggle {
    transition-duration: 320ms;
    transition-timing-function: cubic-bezier(0.2, 0.85, 0.2, 1);
  }

  body[data-owner="true"] #orbStage {
    right: 0;
  }

  body[data-owner="true"] #actionConfirmation {
    right: 1.1rem;
    width: min(27rem, calc(100vw - var(--rail-width) - 2.2rem));
  }

  body[data-owner="true"] #profilePanel {
    width: min(var(--owner-sidebar-width, 28rem), calc(100vw - 6.75rem));
    visibility: hidden;
    transform: translateX(102%);
    pointer-events: none;
    transition-property: width, transform, visibility;
  }

  body[data-owner="true"][data-owner-sidebar="expanded"] #profilePanel {
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }

  body[data-owner="true"][data-owner-sidebar-resizing="true"] {
    cursor: ew-resize;
    user-select: none;
  }

  body[data-owner="true"][data-owner-sidebar-resizing="true"] #profilePanel {
    transition: none;
  }

  body[data-owner="true"][data-owner-sidebar="expanded"] .owner-sidebar-resize:not([hidden]) {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 72;
    width: 0.8rem;
    display: block;
    border: 0;
    outline: 0;
    cursor: ew-resize;
    touch-action: none;
  }

  body[data-owner="true"][data-owner-sidebar="expanded"] .owner-sidebar-resize::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(140, 236, 255, 0.44) 18%, rgba(140, 236, 255, 0.2) 82%, transparent);
    box-shadow: 0 0 0.75rem rgba(140, 236, 255, 0.2);
    transition: width 160ms ease, background 160ms ease, box-shadow 160ms ease;
  }

  body[data-owner="true"][data-owner-sidebar="expanded"] .owner-sidebar-resize:hover::before,
  body[data-owner="true"][data-owner-sidebar="expanded"] .owner-sidebar-resize:focus-visible::before,
  body[data-owner="true"][data-owner-sidebar-resizing="true"] .owner-sidebar-resize::before {
    width: 3px;
    background: linear-gradient(180deg, transparent, rgba(140, 236, 255, 0.92) 18%, rgba(140, 236, 255, 0.56) 82%, transparent);
    box-shadow: 0 0 1rem rgba(140, 236, 255, 0.48);
  }

  body[data-owner="true"] #profileClose {
    display: none;
  }

  body[data-owner="true"] .owner-sidebar-toggle:not([hidden]) {
    position: fixed;
    top: max(0.85rem, env(safe-area-inset-top));
    right: 0.9rem;
    z-index: 66;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(140, 236, 255, 0.26);
    border-radius: 0.55rem;
    color: rgba(192, 238, 248, 0.78);
    background:
      linear-gradient(145deg, rgba(28, 73, 91, 0.54), rgba(4, 15, 25, 0.9)),
      rgba(3, 9, 16, 0.94);
    box-shadow: 0 0.55rem 1.5rem rgba(0, 0, 0, 0.28), 0 0 0.9rem rgba(99, 220, 245, 0.06);
    cursor: pointer;
    backdrop-filter: blur(16px) saturate(130%);
    transition-property: color, border-color, background, box-shadow, transform;
  }

  .owner-sidebar-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .owner-sidebar-arrow {
    transform-origin: center;
    transition: transform 320ms cubic-bezier(0.2, 0.85, 0.2, 1);
  }

  body[data-owner="true"] .owner-workspace::after {
    right: 3.95rem;
  }

  body[data-owner="true"] .owner-sidebar-toggle:hover {
    color: #fff;
    border-color: rgba(140, 236, 255, 0.62);
    background: linear-gradient(180deg, rgba(34, 101, 124, 0.78), rgba(5, 21, 34, 0.98));
    box-shadow: 0 0.65rem 1.8rem rgba(0, 0, 0, 0.34), 0 0 1.2rem rgba(99, 220, 245, 0.16);
    transform: translateY(-1px);
  }

  body[data-owner="true"][data-owner-sidebar="collapsed"] .owner-sidebar-toggle:not([hidden]) {
    color: rgba(218, 250, 255, 0.9);
    border-color: rgba(140, 236, 255, 0.42);
    background: linear-gradient(145deg, rgba(31, 96, 118, 0.72), rgba(5, 20, 32, 0.96));
  }

  body[data-owner="true"][data-owner-sidebar="collapsed"] .owner-sidebar-arrow {
    transform: scaleX(-1);
  }
}
